Add support for jail.conf.d files.
This commit is contained in:
parent
a2945ff069
commit
7db98bc9d1
@ -40,3 +40,5 @@ jail_zfs_dataset: zroot/freebsd/release/jails
|
|||||||
jail_zfs_dataset_mountpoint: /jail/main
|
jail_zfs_dataset_mountpoint: /jail/main
|
||||||
jail_list:
|
jail_list:
|
||||||
- name: cloak
|
- name: cloak
|
||||||
|
conf:
|
||||||
|
src: cloak
|
||||||
|
0
ansible/roles/jail/files/jails/cloak.conf
Normal file
0
ansible/roles/jail/files/jails/cloak.conf
Normal file
@ -60,6 +60,16 @@
|
|||||||
group: wheel
|
group: wheel
|
||||||
loop: "{{ jail_list|subelements('files', skip_missing=True) }}"
|
loop: "{{ jail_list|subelements('files', skip_missing=True) }}"
|
||||||
|
|
||||||
|
- name: Install jail.conf files
|
||||||
|
when: item.conf.src is defined
|
||||||
|
copy:
|
||||||
|
src: "files/jails/{{ item.conf.src }}.conf"
|
||||||
|
dest: "/etc/jail.conf.d/{{ item.conf.dest|default(item.conf.src) }}.conf"
|
||||||
|
mode: "0644"
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
loop: "{{ jail_list }}"
|
||||||
|
|
||||||
- name: Enable Jails
|
- name: Enable Jails
|
||||||
community.general.sysrc:
|
community.general.sysrc:
|
||||||
name: jail_enable
|
name: jail_enable
|
||||||
@ -79,3 +89,4 @@
|
|||||||
path: /etc/rc.conf.d/jail
|
path: /etc/rc.conf.d/jail
|
||||||
state: absent
|
state: absent
|
||||||
when: jail_list|community.general.json_query('[?enabled==`true`]')|length == 0
|
when: jail_list|community.general.json_query('[?enabled==`true`]')|length == 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user