lib/awsborn/rake.rb in awsborn-0.5.3 vs lib/awsborn/rake.rb in awsborn-0.5.4
- old
+ new
@@ -76,9 +76,20 @@
task :new_cookbook do
create_cookbook("cookbooks")
end
end
+ desc "List running servers"
+ task :list do
+ running = default_cluster.select { |server| server.running? }
+ max_name_length = running.map { |server| server.name.to_s.size }.max
+ running.each do |server|
+ h = server.describe_instance
+ puts "%-#{max_name_length}s -- %s -- %s -- %s (%s)" %
+ [server.name, server.host_name, h[:aws_availability_zone], h[:aws_instance_type], h[:architecture]]
+ end
+ end
+
desc "Update chef on the server"
task :update_chef do |t,args|
hosts = get_hosts(args)
default_cluster.each do |server|
next if hosts && ! hosts.include?(server.name.to_s)
\ No newline at end of file