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

@@ -181,7 +181,7 @@
- name: Copying VPN client configuration files
become: true
become_user: "{{ current_user.stdout }}"
when: item.name == inventory_hostname
when: ((fqdn is defined and fqdn != None) and item.name == fqdn) or item.name == inventory_hostname
ansible.builtin.copy:
src: "user/wg/containerized/{{ item.name }}{{ (idx | string) }}.conf"
dest: "{{ ansible_user_home.stdout }}/.wg/containerized/"
@@ -772,7 +772,7 @@
- name: Creating required tailnet container secret for tailnet container specified by Compose file
become: true
# become_user: "{{ current_user.stdout }}"
when: item.name == inventory_hostname
when: ((fqdn is defined and fqdn != None) and item.name == fqdn) or item.name == inventory_hostname
ansible.builtin.copy:
src: "{{ item.name }}-{{ headscale.users.admin.username }}@headscale/headscale{{ (idx | string) }}.key"
dest: "{{ ansible_user_home.stdout }}/.podsecrets/headscale.key"