Sha256: e89f12ba578bdb0ff18fdc34d949a3612389d15c5c7f2e7d6757c0821eb5f3c8

Contents?: true

Size: 701 Bytes

Versions: 1

Compression:

Stored size: 701 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

1 entries across 1 versions & 1 rubygems

Version Path
poolparty-1.6.9 bin/cloud-run