Kim Gert Nielsen
2009-Oct-30 19:20 UTC
[Puppet Users] Building a 3rd party configuration file based on imported modules
Hi, I hope someone can help me the best way (Best practice) to build up a configuration file based om modules. Meaning .. I have a node that imports 2 modules. Apache and NTP. What I want is that a class (in my case apache and ntp) has a function for writing a part of another configuration file (a monitoring tools configuration) I have a motoring tool installed on every host and if I import apache I want the apache class to write 3 lines of configuration in the monitoring tool''s configuration. When NTP is imported I want it to add 3 more lines .. how can that be done ? Best regards Kim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dan Bode
2009-Nov-04 18:46 UTC
[Puppet Users] Re: Building a 3rd party configuration file based on imported modules
Hi Kim, there are two separate practices that can be used to achieve this effect. 1. Each module can manage its own snippet for the config file as a File resource these fragment are just stored in some puppet specific directory on the local host 2. The module responsible for the config file appends the fragments together. 3. When any fragments change, they should notify the fragment manager Have a look at this feature request that I recently opened, RI Pienaar has provided a link to an example implementation. http://projects.reductivelabs.com/issues/2779 If the monitoring requires that config files be modified on a different machine (which is common with Nagios), then exported resources can be used. http://reductivelabs.com/trac/puppet/wiki/ExportedResources I hope this helps, Dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Kim Gert Nielsen
2009-Nov-05 08:35 UTC
[Puppet Users] Re: Building a 3rd party configuration file based on imported modules
Yes! this was what I was looking for .. thanks :) On Nov 4, 2009, at 7:46 PM, Dan Bode wrote: Hi Kim, there are two separate practices that can be used to achieve this effect. 1. Each module can manage its own snippet for the config file as a File resource these fragment are just stored in some puppet specific directory on the local host 2. The module responsible for the config file appends the fragments together. 3. When any fragments change, they should notify the fragment manager Have a look at this feature request that I recently opened, RI Pienaar has provided a link to an example implementation. http://projects.reductivelabs.com/issues/2779 If the monitoring requires that config files be modified on a different machine (which is common with Nagios), then exported resources can be used. http://reductivelabs.com/trac/puppet/wiki/ExportedResources I hope this helps, Dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---