This is more of a ruby programming question I think but here goes.
I would like to load a report from a file for some processing that does not
happen on the puppet master:
#!/usr/bin/env ruby
require 'yaml'
require 'puppet'
report = YAML::load(File.open('/var/lib/puppet/state/last_run_report.yaml',
'r'))
Puppet::Reports.register_report(:myreport) do
def process
if self.status == 'failed'
msg = "failed puppet run for #{self.host} #{self.status}"
else
msg = "puppet run for #{self.host} #{self.status}"
end
end
end
I am not sure that using the register report method is the proper way to go
as this is how you do custom reporting from the master. I have been
looking around in the puppet code for a way to get the report yaml into the
puppet reports class. What is the class and method that I cannot find?
Chris
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.