inserted 'fqdn' variable so use of inventory hostname as a fully qualified domain name for managed node or target host services could be overridden

This commit is contained in:
2026-07-14 14:43:49 -04:00
parent 80fd0ebb09
commit 29d4f33a46
9 changed files with 41 additions and 25 deletions

View File

@@ -67,12 +67,12 @@
when: data_method.user_input == "fetch"
block:
- name: Informing user of inventory requirements for VPN clients
when: not item.name in groups.homeserver
when: ((fqdn is undefined or fqdn == None) and item.name != fqdn) or not item.name in groups.homeserver
ansible.builtin.fail:
msg: The VPN client must be the name of an inventory host in a homeserver group
loop: "{{ vpn.clients }}"
- name: Dupliciating DSNet VPN service client configuration files to control node
when: item.name in groups.homeserver
when: ((fqdn is defined and fqdn != None) and item.name == fqdn) or item.name in groups.homeserver
ansible.builtin.fetch:
src: "{{ ansible_user_home.stdout }}/.wg/authorized_clients.d/{{ item.name }}{{ (idx | string) }}.conf"
dest: "./.tmp/{{ inventory_hostname }}-dsnet/"