Hi,

We use Puppet for many things, including managing the Nagios client (NRPE) 
on OS X and Linux. I have a weird issue where on OS X, when Puppet should 
refresh the service because of a configuration file change, well it unload 
the service instead :-/


Relevant config:


$nrpe_config_file = $operatingsystem ? {
ubuntu => '/etc/nagios/nrpe_local.cfg',
debian => '/etc/nagios/nrpe_local.cfg',
centos => '/etc/nagios/nrpe.cfg',
darwin => '/opt/local/etc/nrpe/nrpe.cfg',
default => '/etc/nagios/nrpe.conf'
}


$nrpe_service_name = $operatingsystem ? {
ubuntu => 'nagios-nrpe-server',
debian => 'nagios-nrpe-server',
centos => 'nrpe',
darwin => 'org.macports.nrpe',
default => 'nrpe'
}


file { 'nrpe_config_file':
ensure => 'present',
path => "${nrpe_config_file}",
owner => "${nrpe_config_file_owner}",
group => "${nrpe_config_file_group}",
mode => '0755',
content => template("nagios/${nrpe_template_file}"),
require => Package['nrpe'],
}


service { 'nrpe_service':
ensure => running,
name => "${nrpe_service_name}",
hasstatus => true,
hasrestart => true,
enable => true,
require => [ Package['nrpe'], File['nrpe_config_file'] ],
subscribe => File['nrpe_config_file'],
}


When the content of 'nrpe_config_file' changes, Puppet's log says:


  Notice: /Stage[main]/Nagios::Client/Service[nrpe_service]: Triggered 
'refresh' from 1 events


But instead, org.macports.nrpe is unloaded from launchd, and I have to load 
it manually with 'launchctl load -w 
/Library/LaunchDaemons/org.macports.nrpe.plist'.

It's with Puppet 3.7.5 and 3.7.4.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a8c79ea7-2dbe-4e0b-b066-99bb4cd1a458%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to