Replacing more "fqdn" module names
This commit is contained in:
parent
5cec9fc098
commit
5b833fc7da
3 changed files with 13 additions and 14 deletions
|
@ -19,7 +19,7 @@
|
|||
jail_{{ jail_name }}_new_ip4: '{{ available_jail_ip4 }}'
|
||||
|
||||
- name: Clone a new ZFS filesystem for the jail
|
||||
zfs:
|
||||
community.general.zfs:
|
||||
origin: '{{ template_dataset_root_name }}@{{ latest_snapshot }}'
|
||||
name: '{{ vars["jail_" + jail_name + "_new_dataset_name"] }}'
|
||||
state: present
|
||||
|
@ -59,7 +59,7 @@
|
|||
{{ vars['jail_' + jail_name + '_timezone'|default(vars['default_timezone'])] }}
|
||||
|
||||
- name: Create config dir for jail
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: '{{ dynamic_jails_path }}/configs/{{ vars["jail_" + jail_name + "_newest_id"] }}'
|
||||
state: directory
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
jail_THIS_with_ip6: "{{ vars['jail_' + jail_name + '_ip6'] | default(False) }}"
|
||||
|
||||
- name: Ensure config directory exists for the generated jails
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: '{{ dynamic_jails_path }}/configs'
|
||||
state: directory
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
loop_var: mountpoint
|
||||
|
||||
- name: Delete syslog socket and its directory to avoid recreating log socket
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: '{{ dynamic_jails_path }}/{{ jail_id }}/var/run/log'
|
||||
state: absent
|
||||
|
||||
|
@ -50,19 +50,18 @@
|
|||
# state: restarted
|
||||
|
||||
- name: Delete config dir for jail
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: '{{ dynamic_jails_path }}/configs/{{ jail_id }}'
|
||||
state: absent
|
||||
|
||||
# FreeBSD 13 started to give errors here, maybe try later
|
||||
#
|
||||
# - name: Destroying ZFS dataset {{ dynamic_jails_dataset_name }}/{{ jail_id }}
|
||||
# zfs:
|
||||
# name: >-
|
||||
# {{ dynamic_jails_dataset_name }}/{{ jail_id }}
|
||||
# state: absent
|
||||
# register: zfs_destroy
|
||||
# ignore_errors: yes
|
||||
- name: Destroying ZFS dataset {{ dynamic_jails_dataset_name }}/{{ jail_id }}
|
||||
community.general.zfs:
|
||||
name: >-
|
||||
{{ dynamic_jails_dataset_name }}/{{ jail_id }}
|
||||
state: absent
|
||||
register: zfs_destroy
|
||||
ignore_errors: yes
|
||||
|
||||
# Due to a possible bug in the ZFS/FreeBSD kernel, destroying the dataset
|
||||
# sometimes isn't possible after freeing it up. Hence we use '-f'
|
||||
|
@ -74,7 +73,7 @@
|
|||
# ignore_errors: yes
|
||||
|
||||
- name: Removing jail directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: >-
|
||||
{{ dynamic_jails_path }}/{{ jail_id }}
|
||||
state: absent
|
||||
|
|
Loading…
Reference in a new issue