I'm relatively new to Puppet and have recently inherited a very large infrastructure (Puppet 3.6 on a number of RHEL 6 machines).
My Puppet infrastructure looks a bit like this:
I have my_module::mysql, which and installs and configures MySQL (based on parameters passed to it from Dashboard or other classes that include it). Among many other things, it sets the location of the log files. (There are a number of other classes like this, and sometimes this class may be called a few different ways on the same node.)
I now have my_module::flume, which installs and configures Apache Flume so I can ship some logs elsewhere.
My problem: I need my_module::flume to know where every instance of my_module::mysql put its logfiles, so it can add those to the Flume configuration file.
What is the best way to do this? I think I want to be able to add to some sort of resource (a global variable or a file) that each class can add a file path to, so my_module::flume can iterate through the list and add each path to a config file, but I'm not sure how to do that while still ensuring that:
-The list of logfiles is started over every time Puppet runs (so, for instance, log files that no longer exist are not still in the list.)
-The Flume class is evaluated only after all the other classes have added the paths to the list.
Any input would be appreciated.