Sha256: f78121af53312800e4dc7859c0ce6d10553b81df20b6769166b2a9a28fe5f42e

Contents?: true

Size: 950 Bytes

Versions: 24

Compression:

Stored size: 950 Bytes

Contents

require 'cap_recipes/tasks/utilities.rb'

Capistrano::Configuration.instance(true).load do

set :install_path, "/usr/local/"

  namespace :ec2 do
    desc "install the ec2-amitools"
    task :install do
      run "unzip ec2-ami-tools.zip -d #{install_path}"
    end
    before "ec2:install", "ec2:install_dependencies"
    before "ec2:install", "ec2:download"
    
    desc "download the ec2-amitools"
    task :download do
      run "wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip" unless File.exists? "ec2-ami-tools.zip"
    end
    
    desc "install the ec2 dependencies"
    task :install_dependencies do
      utilities.apt_install %w[curl gzip openssl rsync]
    end
    
    desc "export ec2-ami-tools to EC2_AMITOOL_HOME and PATH"
    task :export do
      run "export EC2_AMITOOL_HOME=#{install_path}/ec2-ami-tools"
      run "export PATH=$PATH:${EC2_AMITOOL_HOME}/bin"
    end
    after "ec2:install", "ec2:export"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
crazycode-cap-recipes-0.5.3 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.5.2 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.5.1 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.5.0 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.14 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.13 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.12 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.11 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.10 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.9 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.8 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.6 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.5 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.4 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.3 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.2 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.1 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.4.0 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.3.39.3 lib/cap_recipes/tasks/ec2/install.rb
crazycode-cap-recipes-0.3.39.2 lib/cap_recipes/tasks/ec2/install.rb