Get in puppet what is monitored by puppet
Hey @all,
we are happy to use puppet with a big surprise every day ;). Each a new challenge.
Now to the Problem:
We've got a module for haproxy with configurations what takes place with puppet. Now we want another configuration for haproxy. So far we don't have problems. But in some cases we need only the first configuration, in other only the second.
What we need is a possibility to check, which files are monitored by puppet. Example:
Node 1 -> haproxy -> Monitored by Puppet with a special configuration
Node 2 -> haproxy -> Not monitored
Now we have to detect if the file is monitored. I know it is possible with
cat $(puppet agent --configprint resourcefile) | grep haproxy
on the node itself.
Is there any way to do it with a module inside puppet or is a request on the node the only way to get this information?
Thanks Sascha