Sha256: 53327d650f76b61d34b43f2a0d30a568dcb3ccb145a1be673551f2e00dd3920d
Contents?: true
Size: 791 Bytes
Versions: 35
Compression:
Stored size: 791 Bytes
Contents
Capistrano::Configuration.instance(:must_exist).load do namespace :ssl do desc "create csr and key for ssl certificates" task :create, :roles => :app, :except => {:no_release => true} do sudo "mkdir -p /data/ssl/" set(:length) { Capistrano::CLI.ui.ask("key length (1024 or 2048): ") } set(:country) { Capistrano::CLI.ui.ask("Country Code (2 letters): ") } set(:state) { Capistrano::CLI.ui.ask("State/Province: ") } set(:city) { Capistrano::CLI.ui.ask("City: ") } set(:domain) { Capistrano::CLI.ui.ask("Common Name (domain): ") } run "cd /data/ssl/ && openssl req -new -nodes -days 365 -newkey rsa:#{length} -subj '/C=#{country}/ST=#{state}/L=#{city}/CN=#{domain}' -keyout #{domain}.com.key -out #{domain}.com.csr" end end end
Version data entries
35 entries across 35 versions & 3 rubygems