FreeBSD Port: ports-mgmt/pkg

Matthew Seaman matthew at FreeBSD.org
Tue Apr 5 16:52:27 UTC 2016


On 2016/04/05 17:03, Brad Davis wrote:
> Can I see the relevent section of your puppet manifest?

Sure.  This is just one module, which happens to be used for setting up
NPRE and various monitoring tasks.  There are many other modules that
install packages, but they all work pretty similarly.

We have this as parameter settings --

    $default_package_name = ['nrpe','nagios-plugins','p5-Nagios-Plugin']

    case $::osfamily {
        [...]
        'FreeBSD': {
            $config          = '/usr/local/etc/nrpe.cfg'
            $package_name  = $default_package_name
            $service_name  = 'nrpe2'
            $pluginspath   = '/usr/local/libexec/nagios'
            $includedir    = '/usr/local/etc/nrpe.d/'
        }
	[...]
    }

which is referenced here for installing packages:

class nrpe::install inherits nrpe {

    if $operatingsystem == 'FreeBSD' {
        package { $package_name :
            ensure   => $package_ensure,
            provider => 'pkgng',
            require  => Class['pkgrepo'],
        }
    }
    else{
        package { $package_name :
            ensure => $package_ensure,
        }
    }
}

The 'pkgng' provider is from here:

   https://github.com/xaque208/puppet-pkgng

but it's apparently version 0.2.3 from around a year ago, which was
installed from Puppetforge:

   puppet module install zleslie/pkgng

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 972 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20160405/17d8430c/attachment.sig>


More information about the freebsd-pkg mailing list