Joel
2009-May-11 03:32 UTC
[Puppet Users] Creating configurations that require information from multiple hosts
Puppet users, I am a puppet newbie and I have what I hope is a simple question. What is puppet best practice for when you need to create configuration files or types based on information found in other nodes, essentially meta-configuration. So for a practical example my nodes have modules defined which say which services they run, and I would like this information to be used by the nagios host to create the nagios configuration files. We may also be used by MRTG in the future. The method that is deployed, again ideally, probably should not involve going around modifying each module. One approach I can think of is post-processing the puppet YAML config and then using that to spit out nagios/mrtg/anything else configuration files. Is this "best practice" or is there a more puppet way to achieve this? Is there examples somewhere on how to use the Nagios types effectively and automatically so that I do not repeat myself? Cheers Joel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Joel Heenan
2009-May-11 05:10 UTC
[Puppet Users] Creating configurations that require information from multiple hosts
Sorry to answer my own question. The answer appears to be that exported resources provide this functionality, http://reductivelabs.com/trac/puppet/wiki/ExportedResources Here is an example module using them http://github.com/duritong/puppet-nagios/tree/master Joel On Mon, May 11, 2009 at 1:32 PM, Joel <joel.heenan@gmail.com> wrote:> > Puppet users, > > I am a puppet newbie and I have what I hope is a simple question. > > What is puppet best practice for when you need to create configuration > files or types based on information found in other nodes, essentially > meta-configuration. So for a practical example my nodes have modules > defined which say which services they run, and I would like this > information to be used by the nagios host to create the nagios > configuration files. We may also be used by MRTG in the future. The > method that is deployed, again ideally, probably should not involve > going around modifying each module. > > One approach I can think of is post-processing the puppet YAML config > and then using that to spit out nagios/mrtg/anything else > configuration files. Is this "best practice" or is there a more puppet > way to achieve this? Is there examples somewhere on how to use the > Nagios types effectively and automatically so that I do not repeat > myself? > > Cheers > > Joel > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---