[Puppet Users] System configuration and /etc/init.d/* deamons

Xavier Beaudouin
2008-11-17T10:10:04Z

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