18 09 2013
Puppet: Failed to apply catalog: Could not find dependent Service[nrpe] for file.
During my puppeting today I encounted the following error when trying to apply a manifest;
Failed to apply catalog: Could not find dependent Service[nrpe] for File[/etc/nagios/nrpe.cfg]
My manifest looked like;
file { "/etc/nagios/nrpe.cfg":
ensure => "present",
source => "puppet:///modules/internal-module/cpanel-shared/nrpe.cfg",
notify => Service['nrpe'],
}
It turns out you need to also define the service in the manifest to use the notify service function, so I added the following to the manifest;
service { "nrpe":
ensure => "running",
enable => "true",
}
file { "/etc/nagios/nrpe.cfg":
ensure => "present",
source => "puppet:///modules/internal-module/cpanel-shared/nrpe.cfg",
notify => Service['nrpe'],
}
And it will now restart the service when the file is changed (and not break the manifest..) ! :)
Yum: DB_RUNRECOVERY: Fatal error, run database recovery cPanel/easyapache: virtual memory exhausted: Cannot allocate memory