Forge Home

pkgng

PkgNG package provider for FreeBSD

33,200 downloads

2,236 latest version

3.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.3.0 (latest)
  • 2.2.0
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 1.2.0
  • 1.1.1
  • 1.0.0
  • 0.4.0
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.6
  • 0.2.5
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
  • 0.0.9
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5 (deleted)
  • 0.0.4 (deleted)
  • 0.0.3 (deleted)
  • 0.0.2 (deleted)
  • 0.0.1 (deleted)
released Nov 28th 2015
This version is compatible with:
  • Puppet Enterprise >= 3.2.0 < 3.4.0
  • Puppet 3.x
This module has been deprecated by its author since Jan 12th 2021.

The author has suggested puppet-pkgng as its replacement.

Start using this module

Tags: freebsd, pkgng

Documentation

zleslie/pkgng — version 0.3.2 Nov 28th 2015

Puppet-pkgng

Build Status

A package provider for FreeBSD's PkgNG package manager.

This module contains the provider as well as some implementation around configuring the pkg.conf file. If you are building your own PkgNG packages, you may also want to look at the poudriere module.

Installation

The easiest way to install is to install from the forge.

puppet module install zleslie/pkgng

Then to configure your system to use PkgNG with all default settings, a simple include will do.

include pkgng

You may wish to override settings though, to do this simply use it as a class:

class { 'pkgng':
  purge_repos_d => false,
  options       => [
    'PKG_ENV : {',
    ' http_proxy: "http://proxy:3128"',
    '}',
  ],
}

By default, this module will erase the default repository and you'll want to define some. To disable this behaviour you can use the example above of setting purge_repos_d to false.

Using specific repositories is as simple as a Puppet resource.

pkgng::repo { 'pkg.freebsd.org': }  # You'll want this one!
pkgng::repo { 'my.own.repo': }      # You can then specify more...

Installation via R10K

You can also clone this repo to somewhere in your modulepath, or use something like r10k to deploy your modules. R10k is sweet. For those not familiar, check out Finch's blog post on the subject of module deployment.

To track the git repository, a line in your Puppetfile that looks something like the following should get you started.

mod 'pkgng', :git => 'git://github.com/xaque208/puppet-pkgng.git', :ref => '0.2.0'

Installation via Librarian-Puppet

Installation via Librarian-Puppet is straight forward, simply add the following to your Puppetfile

mod 'zleslie/pkgng'

Usage

Once you have the module installed, you can use it by simply adding a site default in site.pp that looks like this.

Package {
  provider => pkgng
}

Now every package that you install will use the PkgNG provider.

With multiple repositories defined, a package can be installed from a specific repo by giving a URN locator for that repository like this.

pkgng::repo { 'my.own.repo': }

package { 'puppet':
  source => 'urn:freebsd:repo:my.own.repo',
}

If you have multible repos provinding the same package you can prefer one repo over the other by increasing the priority. The dafult priority is 0 and higher priorities are prefered

pkgng::repo { 'pkg.freebsd.org': }  
pkgng::repo { 'my.own.repo':
  priority => 10,
}

package {'wget': }

With the above config if the wget package exists in both repositories it would be installed from my.own.repo

Contributing

Please help make this module better. Send pull request, file issues, be mindful of the tests and help improve where you can.