Add enabling startup jails.
This commit is contained in:
parent
33d2118c15
commit
46f182803e
@ -40,3 +40,23 @@
|
||||
loop:
|
||||
- src: new_jail.bash
|
||||
dest: /usr/local/bin/new_jail
|
||||
|
||||
- name: Enable Jails
|
||||
community.general.sysrc:
|
||||
name: jail_enable
|
||||
value: "YES"
|
||||
path: /etc/rc.conf.d/jail
|
||||
when: jail_list|community.general.json_query('[?enabled==`true`]')|length > 0
|
||||
|
||||
- name: Set enabled jail list
|
||||
community.general.sysrc:
|
||||
name: jail_list
|
||||
value: "{{ jail_list|community.general.json_query('[?enabled==`true`].name')|join(' ') }}"
|
||||
path: /etc/rc.conf.d/jail
|
||||
when: jail_list|community.general.json_query('[?enabled==`true`]')|length > 0
|
||||
|
||||
- name: Disable Jails
|
||||
file:
|
||||
path: /etc/rc.conf.d/jail
|
||||
state: absent
|
||||
when: jail_list|community.general.json_query('[?enabled==`true`]')|length == 0
|
||||
|
Loading…
Reference in New Issue
Block a user