Version information
released Sep 29th 2021
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.21.0 < 8.0.0
Start using this module
Add this module to your Puppetfile:
mod 'olevole-cbsd', '0.1.5'
Learn more about managing modules with a PuppetfileDocumentation
olevole/cbsd — version 0.1.5 Sep 29th 2021
CBSD puppet
Table of Contents
- Module Description - What does the module do?
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Contributing - List of module contributors
Module description
The CBSD module allows you to manage CBSD on FreeBSD platform to create virtual environments ( jail, bhyve, XEN ) with Puppet.
CBSD is wrapper around FreeBSD jail bhyve and XEN. For more information please visit website https://bsdstore.ru/
Usage
class { 'cbsd':
#install_method => "git",
jnameserver => "8.8.8.8,8.8.4.4",
nat_enable => 'pf',
workdir => '/usr/jails',
nodeippool => '172.16.0.0/24',
natip => $::ipaddress,
}
# If you install cbsd manually: don't use pkg for
# installing CBSD:
class { 'cbsd':
manage_repo => false,
workdir => '/usr/jails',
}
# Manage FreeBSD bases for jail
# fetch specified base from the repo
class { "cbsd::freebsd_bases":
ver => [ '13.0' ],
stable => 1,
}
cbsd::jail { 'myjail0':
pkg_bootstrap => '0',
host_hostname => 'myjail0.my.domain',
}
cbsd::jail { 'myjail1':
pkg_bootstrap => '0',
host_hostname => 'myjail1.my.domain',
ensure => 'absent',
status => 'stopped'
}
Hiera example:
classes:
- cbsd
- cbsd::freebsd_bases
cbsd::jnameserver: "8.8.8.8,8.8.4.4"
cbsd::nat_enable: "pf"
cbsd::workdir: "/usr/jails"
cbsd::nodeippool: "172.16.0.0/24"
cbsd::natip: '%{::ipaddress}'
cbsd::freebsd_bases::ver: [ 'native' ]
#cbsd::freebsd_bases::ver:
# - '13.0'
# - '12.2'
cbsd::jail:
'cbsdpuppet1':
pkg_bootstrap: '1'
jprofile: 'cbsdpuppet'
astart: '0'
status: 'stopped'
ver: 'native'
ip4_addr: '0'
'test2':
pkg_bootstrap: '1'
astart: '1'
ver: 'native'
host_hostname: 'myjail0.my.domain'
# Create FreeBSD 13.0-ufs cloud VM via bhyve
cbsd::bhyve:
'myvm1':
ensure: absent
vm_os_type: 'freebsd'
host_hostname: 'myvm1.my.domain'
vm_os_profile: 'cloud-FreeBSD-ufs-x64-13.0'
astart: '0'
status: 'stopped'
ip4_addr: '10.0.1.109'
ci_gw4: '10.0.1.14'
Limitations
Works with FreeBSD 13+ and CBSD 13.0.0+
Currently only jail is supported by this module. Bhyve and XEN - work in progress.
Contributing
- Fork it
- Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push
) - Create new Pull Request
Dependencies
- puppetlabs-stdlib (>= 1.0.0)