Sha256: 5e8c6ad170c16b4ce70ad926c33c6791fb58d1863f558becc1fbfbe93301627a
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
namespace :ec2 do desc "Tag all (untagged) instances with role and environment" task :retag do |t| EC2.retag end desc "Rehash instances" task :rehash do |t| EC2.rehash end desc "Rehash single attribute of all instances" task :rehash_attr_all, [:property] do |t, args| if args[:property].nil? puts "Missing property" return 1 end EC2.rehash_property(args[:property]) end desc "Rehash ec2 attributes for a single instance" task :rehash_attrs_for, [:instance] do |t, args| if args[:instance].nil? puts "Missing instance" return 1 end res = EC2.rehash_properties_for_instance(args[:instance]) return 1 unless res end desc "Rehash a single property for an instance" task :rehash_attr_for, [:instance, :property] do |t, args| if args[:instance].nil? puts "Missing instance" return 1 end if args[:property].nil? puts "Missing property" return 1 end res = EC2.rehash_property_for_instance(args[:property], args[:instance]) if res puts "#{property} for instance #{instance} set to '#{res}'" else return 1 end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gaptool-server-0.7.4 | tasks/ec2.rb |
gaptool-server-0.7.3 | tasks/ec2.rb |
gaptool-server-0.7.1 | tasks/ec2.rb |
gaptool-server-0.7.0 | tasks/ec2.rb |