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:
@@ -38,10 +38,10 @@
|
||||
- name: Exemplifying needed ACME record
|
||||
ansible.builtin.set_fact:
|
||||
acme_record: |
|
||||
{{ inventory_hostname }} IN A {{ ipify_public_ip }}
|
||||
_acme-challenge.{{ inventory_hostname }} IN CNAME {{ inventory_hostname }}.acme.{{ inventory_hostname }}.
|
||||
acme.{{ inventory_hostname }} IN NS ns.acme.{{ inventory_hostname }}.
|
||||
ns.acme.{{ inventory_hostname }} IN A {{ ipify_public_ip }}
|
||||
{{ fqdn | default(inventory_hostname) }} IN A {{ ipify_public_ip }}
|
||||
_acme-challenge.{{ fqdn | default(inventory_hostname) }} IN CNAME {{ fqdn | default(inventory_hostname) }}.acme.{{ fqdn | default(inventory_hostname) }}.
|
||||
acme.{{ fqdn | default(inventory_hostname) }} IN NS ns.acme.{{ fqdn | default(inventory_hostname) }}.
|
||||
ns.acme.{{ fqdn | default(inventory_hostname) }} IN A {{ ipify_public_ip }}
|
||||
- name: Informing user of need to set up ACME record
|
||||
ansible.builtin.debug:
|
||||
msg: "Please set ACME record in domain name provider:\n {{ acme_record }}"
|
||||
|
||||
@@ -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/"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user