Sha256: c75cb44ecebf4166533df3da83278d2f833f674cacfe80d7a455562ca456d1ab
Contents?: true
Size: 699 Bytes
Versions: 9
Compression:
Stored size: 699 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../lib") require "poolparty" require 'git-style-binary/command' GitStyleBinary.command do banner <<-EOS Usage: #{$0} #{all_options_string} Run a command on all running instances EOS opt :instance_id, "Run only on a specific instance", :type => String, :default => nil opt :command, "Command to run", :type => String, :default => nil short_desc "Run a command on all running instances" run do |command| puts "Running command #{command[:command]} on all nodes" @loaded_clouds.each do |cld| output = cld.nodes.map do |n| n.ssh(command[:command]) end p output end end end
Version data entries
9 entries across 9 versions & 1 rubygems