#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "poolparty" require "poolpartycl" o = PoolParty::Optioner.new(ARGV) do |opts, optioner| opts.on('-n name', '--name name', 'Copy the master ip for this cloud') { |c| optioner.cloudname c } end o.loaded_clouds.each do |cld| node = cld.list_of_running_instances.first ip = node.ip puts "ip: #{ip}" Kernel.system "echo #{ip} | pbcopy" end