Forge Home


Plugins and classes for OpenBSD


10,636 latest version

1.5 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

  • 0.1.1 (latest)
  • 0.1.0
released Dec 21st 2012

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'oppegaard-openbsd', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add oppegaard-openbsd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install oppegaard-openbsd --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



oppegaard/openbsd — version 0.1.1 Dec 21st 2012

Module for managing OpenBSD

The OpenBSD module contains a plugin for managing the entries in /etc/rc.conf.local and an updated service provider. The two combined makes it possible to enable services and notify them. Classes for other OpenBSD-related functionality which is too OpenBSD specific or too small to warrant their own modules are also included.

The module is tested on OpenBSD 5.2 and with Puppet 2.7.14.


The plugins require pluginsync = true in puppet.conf.

The classes use a custom mount point, /module_data, for looking up private data such as login.conf and mtree files, which should not be part of the module release. Each class which uses this mount point has a parameter _mount, however, if you want to change it to /modules/openbsd and use the /modules mount point.

Setup the /module_data mount point in fileserver.conf:

[module_data] path /var/puppet/module_data allow *.my.domain

The directory should be owned by root:wheel and have permissions 0755. This is to have the same general permissions as the files would have in /etc. Some files need more relaxed permissions than their /etc counterparts, however; _puppet needs read access.

Data files have to be provided by the user, possibly from the host system.


There are two plugings included: an improved service provider and rcconf.

Service provider

The service provider is a small extension to the init.d provider which adds support for rc.d(8) init scripts so services can have their status checked and subscribe to or get notified by other resourcesf.


The rcconf type manages entries in /etc/rc.conf.local. It's based on parsedfile and is ensurable. Double quotes has to managed by the user!


rcconf { 'httpd_flags': value => '"-DSSL"', }

rcconf { 'ntpd_flags':; }

The default value is a double quoted empty string "". This may be changed in the future.


There are three classes included in release 0.1.0: login_conf, mtree and pkg_conf.


Manages login.conf(5). This is a file based class; puppet only copies ready-made login.conf files to the node.

The default mount point is /module_data, which should be installed and populated with default configuration files from your system. Host specific files on the form login.conf-${::fqdn} take precedence.


include openbsd::login_conf


Manages the files in /etc/mtree and runs mtree(8). mtree is a file based class. The default mount point is /module_data, which should be installed.

The specs which are applied are

  • 4.4BSD.dir
  • BSD.local.dist
  • BSD.x11.dist
  • special

Host specific files on the form <file>-${::fqdn} take precedence.


include openbsd::mtree


Manages pkg.conf(5). pkg_conf takes a $settings hash with all the settings that should be written to the file, which is overwritten completely by puppet. If a key's value is an array, the entries after the first will be on the form key += val. The first setting is always key = val.


class { 'openbsd::pkg_conf': settings => { installpath => [ "file:///mnt/openbsd/${::operatingsystemrelease}/packages/${::architecture}/", "${::operatingsystemrelease}/packages/${::architecture}/", ], ntogo => 'yes', }, }