Ansible Modules for FreeBSD
Testing requires Molecule, Vagrant & Virtualbox.
Loads the given kernel module, or puts it in the /boot/loader.conf
Parameter | Choices/Defaults | Comments |
---|---|---|
name | Name of the kernel module. .ko is typically not needed | |
load | Default: True | Load or unload the module |
boot | Default: True | Apply the kernel module at boot. |
---
# Adds accf_http to the bootloader and loads it
- kld:
name: accf_http
# Removes accf_http from the bootloader and loads it
- kld:
name: accf_http
load: true
boot: false
Uses sysrc(8) to set a sys var in /etc/rc.conf (default) or the given
$dest
file
Parameter | Choices/Defaults | Comments |
---|---|---|
dest | The file to modify | |
delim | |
Delimiter. Used with append/subtract |
name | Name of the variable to manage | |
value | Required when not state=absent |
|
state | Choices:
|
Whether the var should be appended, substracted, exist, or not exist. |
---
# enable mysql in the /etc/rc.conf
- name: Configure mysql pid file
sysrc:
name: mysql_pidfile
value: "/var/run/mysqld/mysqld.pid"
# enable accf_http kld in the boot loader
- name: enable accf_http kld
sysrc:
name: accf_http_load
state: present
value: "YES"
dest: /boot/loader.conf
# add gif0 to cloned_interfaces
- name: add gif0 interface
sysrc:
name: cloned_interfaces
state: append
value: "gif0"