First page Back Continue Last page Overview Graphics
Notify, Subscribe and Exec
Let us make sure mail to postmaster goes to root and run newaliases when we update this:
mailalias { "postmaster":
ensure => present,
recipient => "root",
notify => Exec["newaliases"],
}
exec { "newaliases":
path => ["/usr/bin", "/usr/sbin"],
refreshonly => true,
}
On the other hand, we can tell puppet that a service should be restarted when a file changes:
service { "nrpe":
ensure => running,
enable => true,
subscribe => File["/etc/nagios/nrpe.cfg"];
}