You need to add a 'subscribe' or 'notify' parameter to your server or file resource (respectively). For example:
http://docs.puppetlabs.com/references/stable/metaparameter.html#notify There is an example in the puppetlabs-ntp module: https://github.com/puppetlabs/puppetlabs-ntp/blob/master/manifests/init.pp#L94-109 Or you can just grab the ntp module from the forge and use that instead: http://forge.puppetlabs.com/puppetlabs/ntp ken. On Wed, Aug 10, 2011 at 12:51 PM, Sans <r.santanu....@gmail.com> wrote: > Dear all, > > How can i restart "a" service on the agent [only] if the associated > configuration file is changed. e.g. if I change the configuration in > ntp.conf, I like to restart the ntpd as soon as the changes are > detected and applied. Is there a way of doing that? Cheers!! > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.