Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 204869300f
Fetching contributors…

Cannot retrieve contributors at this time

executable file 26 lines (18 sloc) 0.558 kb
#!/usr/bin/env ruby
require 'mcollective'
oparser = MCollective::Optionparser.new({}, "filter")
options = oparser.parse{|parser, options|
parser.define_head "Find hosts matching criteria"
parser.banner = "Usage: mc-find-hosts [options] [filters]"
}
begin
client = MCollective::Client.new(options[:config])
client.options = options
stats = client.req("ping", "discovery") do |resp|
puts resp[:senderid]
end
rescue Exception => e
raise
end
client.display_stats(stats) if options[:verbose]
# vi:tabstop=4:expandtab:ai
Jump to Line
Something went wrong with that request. Please try again.