Skip to content

Instantly share code, notes, and snippets.

@tetu1984
Created October 2, 2012 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tetu1984/3819522 to your computer and use it in GitHub Desktop.
Save tetu1984/3819522 to your computer and use it in GitHub Desktop.
KEY_FILE = '/path/to/aws.pem'
server 'ec2-54-248-135-100.ap-northeast-1.compute.amazonaws.com', :srv1
server 'ec2-54-248-26-71.ap-northeast-1.compute.amazonaws.com', :srv2
server 'ec2-46-51-239-7.ap-northeast-1.compute.amazonaws.com', :srv3
set :user, 'ec2-user'
ssh_options[:keys] = KEY_FILE
task :uname_all do
run "uname -a"
end
task :uname_srv1, :roles => :srv1 do
run "uname -a"
end
task :uname_srv2, :roles => :srv2 do
run "uname -a"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment