Hi, all!
I'm trying to set up a double-reporting from my puppet-masters to "local"
instance of Foreman (basically default setup) *and* to a "remote" Foreman
instance used only for centralized reports and facts storing for
convenience.
So, I made a copy of /usr/share/ruby/vendor_ruby/puppet/reports/foreman.rb
to /usr/share/ruby/vendor_ruby/puppet/reports/remote.rb, modified report
name and config file name(s):
# diff foreman.rb remote.rb
4c4
< # configuration is in /etc/puppet/foreman.yaml
---
> # configuration is in /etc/puppet/remote.yaml
28c28
< $settings_file = '/usr/local/etc/puppet/foreman.yaml'
---
> $settings_file = '/usr/local/etc/puppet/remote.yaml'
30c30
< $settings_file = File.exist?('/etc/puppetlabs/puppet/foreman.yaml') ?
'/etc/puppetlabs/puppet/foreman.yaml' : '/etc/puppet/foreman.yaml'
---
> $settings_file = File.exist?('/etc/puppetlabs/puppet/remote.yaml') ?
'/etc/puppetlabs/puppet/remote.yaml' : '/etc/puppet/remote.yaml'
35,36c35,36
< Puppet::Reports.register_report(:foreman) do
< desc "Sends reports directly to Foreman"
---
> Puppet::Reports.register_report(:remote) do
> desc "Sends reports directly to #{SETTINGS[:url]}"
And added that report name to puppet.conf on my masters:
# grep reports /etc/puppet/puppet.conf
reports = remote, foreman
#
After restart/reload of Apache, I see that reports are sent to both places,
but only *once*. Subsequent puppet runs result in reports sent *only* to
whatever report is specified the last. As in example above, only local
instance would get reports. If I flip to "foreman, remote", remote is the
one that would have the reports sent to and not a local one.
Other type if reports (log, store) do not exhibit the same issue, so I must
be missing something in remote.rb and it creates a conflict of some sort. I
don't any errors in logs or anything.
Any clues?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Foreman 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 https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.