JoergFiedler.freebsd-jailed
freebsd-jailed
This role creates a jail. That's it. It is used by other roles to set up jailed services.
Requirements
This role is designed for a fresh FreeBSD installation. You can use a Vagrant Box (https://app.vagrantup.com/JoergFiedler) with providers for VirtualBox and EC2.
Role Variables
jail_name
The name of the jail. This is the local part of the hostname. Default: '{{ jail_net_ip }}'
.
jail_domain
The domain part of the hostname. Default: 'darkcity'
.
jail_backup_old_files
Set to yes
if you want to create backup files for any changes made by Ansible. Default: no
.
jail_freebsd_release
The FreeBSD version to use for this jail, e.g., 12.1-RELEASE
. If not set, it will use the current release version. Default: {{ ansible_distribution_version }}-RELEASE
.
jail_net_if
The network interface where the jail's IP address will be assigned. Default: 'lo0'
.
jail_net_ip
The jail's IP address. No default value.
jail_net_resolver
The DNS server for the jail. If set to none
, the resolver settings from the jail host will apply. Default: none
.
Specify as shown in man 8 iocage
, e.g., nameserver 1.1.1.1
. This will be used to create the jail's /etc/resolv.conf
.
If the value includes the jail's IP, unbound resolver will be installed.
jail_use_syslogd_server
jail_syslogd_server
The syslog server to which all syslog messages will be sent. If not set, messages will stay local. No default value.
This feature works only if jail_use_syslogd_server
is set.
jail_build_server_enabled
Enable your own build server repository for customized build ports. Default: no
.
If enabled, the FreeBSD repo /etc/pkg/FreeBSD.conf
will be disabled. Ensure all packages you need are available at jail_build_server_url
.
jail_build_server_url
The HTTP URL for the build server repository. Default: ''
.
jail_build_server_pubkey
The public key to verify signatures. Default: 'poudriere.pub'
.
Dependencies
Example Playbook
- hosts: all
become: true
tasks:
- import_role:
name: 'JoergFiedler.freebsd-jail-host'
- include_role:
name: 'JoergFiedler.freebsd-jailed'
vars:
jail_net_ip: '10.1.0.10'
jail_name: 'jailed'
License
BSD
Author Information
If you like this or have ideas for improvement, please open an issue on GitHub. Thanks!