Skip to content

Latest commit

 

History

History
210 lines (118 loc) · 4.69 KB

REFERENCE.md

File metadata and controls

210 lines (118 loc) · 4.69 KB

Reference

Table of Contents

Classes

  • pkgng: This configures the PkgNG Package manager on FreeBSD systems, and adds support for managing packages with Puppet. This will eventually be in

Defined types

  • pkgng::repo: This configures a single PkgNG repository. Instead of defining the repo with the repo URL, we split it up in hostname, mirror_type, protocol

Data types

Classes

pkgng

This configures the PkgNG Package manager on FreeBSD systems, and adds support for managing packages with Puppet. This will eventually be in mainline FreeBSD, but for now, we are leaving the installation up to the administrator, since there is no going back.

If you have purge_repos_d as true - then you'll have no repositories defined unless you define one. You want to do this as you'll want this module to control repos anyway.

To install PkgNG, one can simply run the following: make -C /usr/ports/ports-mgmg/pkg install clean

Examples

include pkgng

Parameters

The following parameters are available in the pkgng class:

pkg_dbdir

Data type: Stdlib::Absolutepath

Full path to database directory for pkg(8)

Default value: '/var/db/pkg'

pkg_cachedir

Data type: Stdlib::Absolutepath

Full path to cache directory for pkg(8)

Default value: '/var/cache/pkg'

portsdir

Data type: Stdlib::Absolutepath

Full path to ports directory

Default value: '/usr/ports'

options

Data type: Array[String]

Extra options to write to pkg.conf(5)

Default value: []

purge_repos_d

Data type: Boolean

Whether unmanaged repositories should be removed

Default value: true

repos

Data type: Hash

Repositories to manage using create_resources()

Default value: {}

Defined types

pkgng::repo

This configures a single PkgNG repository. Instead of defining the repo with the repo URL, we split it up in hostname, mirror_type, protocol and repopath. This way, this resource can be integrated with possible firewalls better.

Examples

to use the class
pkg::repo { 'pkg.example.com': }

Parameters

The following parameters are available in the pkgng::repo defined type:

packagehost

Data type: String[1]

Hostname of the repository

Default value: $name

protocol

Data type: Pkgng::Protocol

Transport used to reach the repository

Default value: 'http'

mirror_type

Data type: Pkgng::Mirror_type

Mirror type of the repository

Default value: 'srv'

repopath

Data type: Stdlib::Absolutepath

Path of the repository on packagehost

Default value: '/${ABI}/latest'

enabled

Data type: Boolean

Whether this repository is currently enabled

Default value: true

priority

Data type: Integer[0,100]

Priority of the repository

Default value: 0

pubkey

Data type: Optional[Stdlib::Absolutepath]

Path to the file containing the public key for this repository

Default value: undef

fingerprints

Data type: Optional[Stdlib::Absolutepath]

Path to the file containing known signatures for the repository

Default value: undef

Data types

Pkgng::Mirror_type

The type of a pkg mirror

Alias of Enum['http', 'none', 'srv']

Pkgng::Protocol

The protocol for a pkg mirror

Alias of Enum['file', 'ftp', 'http', 'https', 'ssh']