Hi,
I'm working on our first Puppet deployment, and one of the things we want to install is the NRPE (Nagios agent) on our CentOS, Ubuntu and OS X boxes. The problem is: MacPorts don't get installs, and I get:
Error: /Stage[main]/Nagios/Package[${nagios_plugins}]: Provider macports is not functional on this host
Error: /Stage[main]/Nagios/Package[${$nrpe}]: Provider macports is not functional on this host
Error: /Stage[main]/Macosx/Package[smartmontools]: Provider macports is not functional on this host
Structure:
site.pp:
node 'agent-puppet-os-x.local' {
include macosx
file_line { 'apple raid':
ensure => present,
line => 'command[check_raid]=/opt/local/libexec/nagios/check_apple_raid 0B6D5A7C-7EF1-4775-8F73-9D8EB912560E',
path => '/opt/local/etc/nrpe/nrpe.cfg',
require => Package['nrpe'],
}
}
modules/macosx/manifests/init.pp:
class macosx {
include macosx::macports
include nagios::client
}
modules/macosx/manifests/macports.pp:
class macosx::macports {
package { 'CommandLineTools':
ensure => installed,
provider => pkgdmg,
}
package { 'macports':
ensure => installed,
provider => pkgdmg,
require => Package['CommandLineTools'],
before => Package['nrpe','nagios-plugins'],
}
}
modules/macosx/nagios/init.pp:
class nagios {
include macosx::macports
$provider = $operatingsystem ? {
ubuntu => 'apt',
centos => 'yum',
darwin => 'macports',
default => 'yum'
}
package { '${$nrpe}':
ensure => installed,
alias => 'nrpe',
provider => $provider,
}
}