puppet-jail

FreeBSD Jails with Puppet


Keywords
freebsd, jails, containers, iocage, zfs, ruby, puppet, jail, hacktoberfest, freebsd-jails, jail-management
License
Apache-2.0
Install
puppet module install puppet-jail --version 5.0.0

Documentation

FreeBSD Jail management with Puppet

Puppet Forge Build Status

Manage FreeBSD jails with Puppet, leveraging iocage for jail management.

Setup

This module expects to be the only jail manager on a given system. Each system where jails will be managed needs to include the jail::setup class as well.

include jail::setup

This simply installs 'iocage' and removes '/etc/jail.conf'.

This allows the type to use the correct jail without having to specify the pool on each jail.

A simple jail

jail { 'myjail1':
  ensure    => present,
  state     => 'up',
  ip4_addr  => 'em0|10.0.0.10/24',
  ip6_addr  => 'em0|fc00::10/64',
  hostname  => 'myjail1.example.com',
  boot      => 'on',
  user_data => template('mysite/user_data.sh.erb'),
}

Note the ip4_addr and the ip6_addr properties take an interface name and an IP address separated by a pipe character. This value is passed directly to iocage(7). You may wish to read the man page.