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

Version Path
poolparty-1.6.8 bin/cloud-run
poolparty-1.6.7 bin/cloud-run
poolparty-1.6.6 bin/cloud-run
poolparty-1.6.5 bin/cloud-run
poolparty-1.6.4 bin/cloud-run
poolparty-1.6.3 bin/cloud-run
poolparty-1.6.2 bin/cloud-run
poolparty-1.6.1 bin/cloud-run
poolparty-1.6.0 bin/cloud-run