Replacing more "fqdn" module names

This commit is contained in:
László Károlyi 2021-05-28 11:12:19 +02:00
parent 5cec9fc098
commit 5b833fc7da
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE
3 changed files with 13 additions and 14 deletions

View file

@ -19,7 +19,7 @@
jail_{{ jail_name }}_new_ip4: '{{ available_jail_ip4 }}' jail_{{ jail_name }}_new_ip4: '{{ available_jail_ip4 }}'
- name: Clone a new ZFS filesystem for the jail - name: Clone a new ZFS filesystem for the jail
zfs: community.general.zfs:
origin: '{{ template_dataset_root_name }}@{{ latest_snapshot }}' origin: '{{ template_dataset_root_name }}@{{ latest_snapshot }}'
name: '{{ vars["jail_" + jail_name + "_new_dataset_name"] }}' name: '{{ vars["jail_" + jail_name + "_new_dataset_name"] }}'
state: present state: present
@ -59,7 +59,7 @@
{{ vars['jail_' + jail_name + '_timezone'|default(vars['default_timezone'])] }} {{ vars['jail_' + jail_name + '_timezone'|default(vars['default_timezone'])] }}
- name: Create config dir for jail - name: Create config dir for jail
file: ansible.builtin.file:
path: '{{ dynamic_jails_path }}/configs/{{ vars["jail_" + jail_name + "_newest_id"] }}' path: '{{ dynamic_jails_path }}/configs/{{ vars["jail_" + jail_name + "_newest_id"] }}'
state: directory state: directory

View file

@ -25,7 +25,7 @@
jail_THIS_with_ip6: "{{ vars['jail_' + jail_name + '_ip6'] | default(False) }}" jail_THIS_with_ip6: "{{ vars['jail_' + jail_name + '_ip6'] | default(False) }}"
- name: Ensure config directory exists for the generated jails - name: Ensure config directory exists for the generated jails
file: ansible.builtin.file:
path: '{{ dynamic_jails_path }}/configs' path: '{{ dynamic_jails_path }}/configs'
state: directory state: directory

View file

@ -40,7 +40,7 @@
loop_var: mountpoint loop_var: mountpoint
- name: Delete syslog socket and its directory to avoid recreating log socket - 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' path: '{{ dynamic_jails_path }}/{{ jail_id }}/var/run/log'
state: absent state: absent
@ -50,19 +50,18 @@
# state: restarted # state: restarted
- name: Delete config dir for jail - name: Delete config dir for jail
file: ansible.builtin.file:
path: '{{ dynamic_jails_path }}/configs/{{ jail_id }}' path: '{{ dynamic_jails_path }}/configs/{{ jail_id }}'
state: absent state: absent
# FreeBSD 13 started to give errors here, maybe try later # FreeBSD 13 started to give errors here, maybe try later
# - name: Destroying ZFS dataset {{ dynamic_jails_dataset_name }}/{{ jail_id }}
# - name: Destroying ZFS dataset {{ dynamic_jails_dataset_name }}/{{ jail_id }} community.general.zfs:
# zfs: name: >-
# name: >- {{ dynamic_jails_dataset_name }}/{{ jail_id }}
# {{ dynamic_jails_dataset_name }}/{{ jail_id }} state: absent
# state: absent register: zfs_destroy
# register: zfs_destroy ignore_errors: yes
# ignore_errors: yes
# Due to a possible bug in the ZFS/FreeBSD kernel, destroying the dataset # 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' # sometimes isn't possible after freeing it up. Hence we use '-f'
@ -74,7 +73,7 @@
# ignore_errors: yes # ignore_errors: yes
- name: Removing jail directory - name: Removing jail directory
file: ansible.builtin.file:
path: >- path: >-
{{ dynamic_jails_path }}/{{ jail_id }} {{ dynamic_jails_path }}/{{ jail_id }}
state: absent state: absent