Sha256: 84e49d1f45b64496059be4dfc2330c6c74ed7c2e8bfe63ec1a5fddcadaa416f7

Contents?: true

Size: 1.47 KB

Versions: 134

Compression:

Stored size: 1.47 KB

Contents

# Copyright 2006-2008 by Mike Bailey. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do 
    namespace :ssl do

      # Install Openssl
      task :install, :roles => :web do
        install_deps
      end

      # Install dependencies for ssl
      task :install_deps, :roles => :web do
        apt.install( {:base => %w(openssl)}, :stable )
      end

      PROJECT_CONFIG_FILES[:ssl] = [

        {:template => 'ssl-cert-snakeoil.pem',
          :path => '/etc/ssl/certs/ssl-cert-snakeoil.pem',
          :mode => 0644,
          :owner => 'root:root'},

        {:template => 'ssl-cert-snakeoil.key',
          :path => "/etc/ssl/private/ssl-cert-snakeoil.key",
          :mode => 0640,
          :owner => 'root:ssl-cert'},
          
        { :template => 'make-ssl-cert',
            :path => "/usr/sbin/make-ssl-cert",
            :mode => 0755,
            :owner => 'root:root'}
          
      ]
      
      # Generate ssl certs
      task :config_gen do
        PROJECT_CONFIG_FILES[:ssl].each do |file|
          deprec2.render_template(:ssl, file)
        end
      end

      # Copy out ssl certs
      task :config, :roles => :web do
        deprec2.push_configs(:ssl, PROJECT_CONFIG_FILES[:ssl])
      end
      
      # WOn't run without controlling terminal! :-(
      # task :generate_snakeoil_cert, :roles => :web do
      #   sudo "/usr/sbin/make-ssl-cert generate-default-snakeoil"
      # end
      
    end
    
  end
end
      

Version data entries

134 entries across 134 versions & 3 rubygems

Version Path
le1t0-deprec-2.1.6.065 lib/deprec/recipes/ssl.rb
deprec-2.1.16 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.064 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.063 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.062 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.061 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.059 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.058 lib/deprec/recipes/ssl.rb
deprec-2.1.14 lib/deprec/recipes/ssl.rb
deprec-2.1.13 lib/deprec/recipes/ssl.rb
deprec-2.1.12 lib/deprec/recipes/ssl.rb
deprec-2.1.11 lib/deprec/recipes/ssl.rb
deprec-2.1.10 lib/deprec/recipes/ssl.rb
deprec-2.1.8 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.057 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.056 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.055 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.054 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.053 lib/deprec/recipes/ssl.rb
le1t0-deprec-2.1.6.052 lib/deprec/recipes/ssl.rb