Skip to content

Instantly share code, notes, and snippets.

@ploubser
Created August 5, 2013 13:24
Show Gist options
  • Save ploubser/6155895 to your computer and use it in GitHub Desktop.
Save ploubser/6155895 to your computer and use it in GitHub Desktop.
require 'mcollective'
require 'pp'
include MCollective::RPC
client = rpcclient("rpcutil")
result = client.agent_inventory
File.open("/tmp/mc_debug.txt", "w") do |f|
result.each do |r|
f.puts "-----------------"
begin
f.puts r[:sender]
f.puts r[:data][:agent].pretty_inspect
rescue => e
f.puts "****************"
f.puts "Error on node #{r[:sender]}"
f.puts e
f.puts r.pretty_inspect
f.puts "****************"
end
f.puts "-----------------"
end
end
@ploubser
Copy link
Author

ploubser commented Aug 5, 2013

Run as puppet-dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment