Sha256: a3ea031190fd3ae467c41fb1477ce2d8a6f2153c5a8d133f06ef6d323d9cf41f
Contents?: true
Size: 718 Bytes
Versions: 8
Compression:
Stored size: 718 Bytes
Contents
Capistrano::Configuration.instance.load do require_settings :ec2 namespace :z do desc "List zones" task :default do puts "Listing availability zones:" ec2.zones.each do |z| puts "%-16s %s" % ["#{z}:", ec2.available_servers_in_zone(z).map(&:id).join(", ")] end puts "" puts "Commands: #{ec2.zones.map {|z| "z:#{z}" }.join(", ")}" end end end Capistrano::Configuration.instance(:must_exist).load do def ec2_zones namespace :z do ec2.zones.each do |z| desc "Invoke Zone: #{z}" task z do ec2.available_servers_in_zone(z).each do |s| server s.address, *s.roles end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems