diff --git a/ansible/group_vars/all/network.yml b/ansible/group_vars/all/network.yml index bc22f13..83675d4 100644 --- a/ansible/group_vars/all/network.yml +++ b/ansible/group_vars/all/network.yml @@ -1,2 +1,2 @@ -private_ip: "{{ nebula.clients[ansible_fqdn].ip }}" +private_ip: "{{ nebula.clients[ansible_hostname].ip }}" protected_ip: "{{ private_ip }}" diff --git a/ansible/roles/duplicati/files/docker-compose.yml b/ansible/roles/duplicati/files/docker-compose.yml index cfb4853..5ea67db 100644 --- a/ansible/roles/duplicati/files/docker-compose.yml +++ b/ansible/roles/duplicati/files/docker-compose.yml @@ -2,7 +2,7 @@ version: "2.3" services: duplicati: image: linuxserver/duplicati:version-v2.0.5.1-2.0.5.1_beta_2020-01-18 - hostname: "{{ ansible_fqdn }}" + hostname: "{{ ansible_hostname }}" environment: - PUID=0 - PGID=0 diff --git a/ansible/roles/forrest/files/telegraf.conf b/ansible/roles/forrest/files/telegraf.conf index e1d9e3b..a1dcd2b 100644 --- a/ansible/roles/forrest/files/telegraf.conf +++ b/ansible/roles/forrest/files/telegraf.conf @@ -75,7 +75,7 @@ # logfile_rotation_max_archives = 5 ## Override default hostname, if empty use os.Hostname() - hostname = "{{ ansible_fqdn }}" + hostname = "{{ ansible_hostname }}" ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false diff --git a/ansible/roles/nebula/files/nebula.yml b/ansible/roles/nebula/files/nebula.yml index b766f6a..67396d7 100644 --- a/ansible/roles/nebula/files/nebula.yml +++ b/ansible/roles/nebula/files/nebula.yml @@ -1,7 +1,7 @@ pki: ca: /etc/nebula/ca.crt - cert: /etc/nebula/{{ ansible_fqdn }}.crt - key: /etc/nebula/{{ ansible_fqdn }}.key + cert: /etc/nebula/{{ ansible_hostname }}.crt + key: /etc/nebula/{{ ansible_hostname }}.key static_host_map: "{{ nebula_lighthouse_ip }}": ["{{ nebula_lighthouse_public_ip }}:{{ nebula_lighthouse_port }}"] @@ -31,7 +31,7 @@ tun: mtu: 1300 routes: unsafe_routes: -{% if ansible_fqdn != "ingress" %} +{% if ansible_hostname != "ingress" %} - route: "{{ pve_hosts.internal_cidr }}" via: "{{ nebula.clients.ingress.ip }}" {% endif %} diff --git a/ansible/roles/nebula/tasks/main.yml b/ansible/roles/nebula/tasks/main.yml index 120d9bd..17ee84c 100644 --- a/ansible/roles/nebula/tasks/main.yml +++ b/ansible/roles/nebula/tasks/main.yml @@ -36,8 +36,8 @@ dest: /etc/nebula/{{ item }} mode: "0600" loop: - - "{{ ansible_fqdn }}.key" - - "{{ ansible_fqdn }}.crt" + - "{{ ansible_hostname }}.key" + - "{{ ansible_hostname }}.crt" become: true notify: restart nebula @@ -63,4 +63,4 @@ jump: MASQUERADE notify: persist iptables become: true - when: ansible_fqdn == "ingress" + when: ansible_hostname == "ingress"