Sha256: a1816bc750099cca9e7b25be5053262c0f81d8a8064157facc1d5cd98cb5c289
Contents?: true
Size: 752 Bytes
Versions: 18
Compression:
Stored size: 752 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "poolparty" require "poolpartycl" @cmd = ARGV[-1] o = PoolParty::Optioner.new(ARGV) do |opts, optioner| opts.on('-n name', '--name name', 'Listing for cloud name') { |c| optioner.cloudname c } opts.on('-i num', '--id num', 'Instance num to ssh (default: 0)') { |i| optioner.num i } opts.on('-c command', '--command command', 'Command to run on the instance') { |c| optioner.command c } end load_pool(o.spec || Binary.get_existing_spec_location) @cmd = o.command if (o.command) @cloud = o.cloudname ? cloud(o.cloudname.downcase.to_sym) : cloud(clouds.keys.first) instance = @cloud.run_command_on_instance_number( @cmd, o.num.to_i || 0 ) if @cloud
Version data entries
18 entries across 18 versions & 2 rubygems