Provider macports is not functional on this host error

66 views
Skip to first unread message

Pascal Robert

unread,
Feb 26, 2014, 10:47:44 AM2/26/14
to puppet...@googlegroups.com
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,
  }

}


Felix Frank

unread,
Apr 16, 2014, 8:36:27 AM4/16/14
to puppet...@googlegroups.com
Hi,

that's weird. What's the output of

facter -p operatingsystem

on this machine?
Reply all
Reply to author
Forward
0 new messages