Xavier Beaudouin
2008-Nov-17 10:10 UTC
[Puppet Users] System configuration and /etc/init.d/* deamons
Hi, I wish to update some files, like for example /etc/ntp.conf (or others like this)... and restart daemons if the file has being updated. I''am able to send the file.... with the following class : # NTP class ntpconf { case $operatingsystem { "RedHat": { file { "/etc/ntp.conf" : path => "/etc/ntp.conf", mode => 0644, owner => root, group => root, content => template("ntp.conf.rh.erb"); } } } } One thing I miss is how to do /etc/init.d/ntp restart when the file is modified, but *only* if the file is modified (not every time the check has been done....) ? Thanks /Xavier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2008-Nov-17 10:19 UTC
[Puppet Users] Re: System configuration and /etc/init.d/* deamons
Hi> One thing I miss is how to do /etc/init.d/ntp restart when the file is > modified, but *only* if the file is modified (not every time the check > has been done....) ?you have then to manage the ntp-service and use the notify in the file definition for this service. have a look at the documentation on the wikis. this very default example is covered in various places. cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Xavier Beaudouin
2008-Nov-17 10:40 UTC
[Puppet Users] Re: System configuration and /etc/init.d/* deamons
Hi, On Nov 17, 11:19 am, Peter Meier <peter.me...@immerda.ch> wrote:> Hi > > > One thing I miss is how to do /etc/init.d/ntp restart when the file is > > modified, but *only* if the file is modified (not every time the check > > has been done....) ? > > you have then to manage the ntp-service and use the notify in the file > definition for this service. > > have a look at the documentation on the wikis. this very default example > is covered in various places.Hum... Yes, but I didn''t yet understood how to "manage the ntp- service"... Sorry about this newbee question, but I''m still a bit puzzled about that... Or if you have a good and simple example pointer I will be please to check and see that on myself. Thanks, /Xavier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2008-Nov-17 11:02 UTC
[Puppet Users] Re: System configuration and /etc/init.d/* deamons
Hi> Hum... Yes, but I didn''t yet understood how to "manage the ntp- > service"...by using the service type: http://reductivelabs.com/trac/puppet/wiki/TypeReference#service> Sorry about this newbee question, but I''m still a bit puzzled about > that... Or if you have a good and simple example pointer I will be > please to check and see that on myself.The best thing is that you go through the docu on the wiki. There are a lot of different examples how you can do different stuff. A good example for your current need is: http://reductivelabs.com/trac/puppet/wiki/Recipes/Monit There is even an example for OpenNTPD: http://reductivelabs.com/trac/puppet/wiki/Recipes/OpenNTPD but to start this might look a bit complicated, but after reading some docu and getting used to puppet, you''ll see what it is doing. There are other ntp examples as well: http://git.black.co.at/?p=module-ntp or http://github.com/puzzle/puppet-ntp/tree/master cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---