Use hostname rather than fqdn

This commit is contained in:
Jake Howard 2021-03-04 16:06:43 +00:00
parent a4eb26b129
commit 2e05ed08fa
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 9 additions and 9 deletions

View file

@ -1,2 +1,2 @@
private_ip: "{{ nebula.clients[ansible_fqdn].ip }}" private_ip: "{{ nebula.clients[ansible_hostname].ip }}"
protected_ip: "{{ private_ip }}" protected_ip: "{{ private_ip }}"

View file

@ -2,7 +2,7 @@ version: "2.3"
services: services:
duplicati: duplicati:
image: linuxserver/duplicati:version-v2.0.5.1-2.0.5.1_beta_2020-01-18 image: linuxserver/duplicati:version-v2.0.5.1-2.0.5.1_beta_2020-01-18
hostname: "{{ ansible_fqdn }}" hostname: "{{ ansible_hostname }}"
environment: environment:
- PUID=0 - PUID=0
- PGID=0 - PGID=0

View file

@ -75,7 +75,7 @@
# logfile_rotation_max_archives = 5 # logfile_rotation_max_archives = 5
## Override default hostname, if empty use os.Hostname() ## 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. ## If set to true, do no set the "host" tag in the telegraf agent.
omit_hostname = false omit_hostname = false

View file

@ -1,7 +1,7 @@
pki: pki:
ca: /etc/nebula/ca.crt ca: /etc/nebula/ca.crt
cert: /etc/nebula/{{ ansible_fqdn }}.crt cert: /etc/nebula/{{ ansible_hostname }}.crt
key: /etc/nebula/{{ ansible_fqdn }}.key key: /etc/nebula/{{ ansible_hostname }}.key
static_host_map: static_host_map:
"{{ nebula_lighthouse_ip }}": ["{{ nebula_lighthouse_public_ip }}:{{ nebula_lighthouse_port }}"] "{{ nebula_lighthouse_ip }}": ["{{ nebula_lighthouse_public_ip }}:{{ nebula_lighthouse_port }}"]
@ -31,7 +31,7 @@ tun:
mtu: 1300 mtu: 1300
routes: routes:
unsafe_routes: unsafe_routes:
{% if ansible_fqdn != "ingress" %} {% if ansible_hostname != "ingress" %}
- route: "{{ pve_hosts.internal_cidr }}" - route: "{{ pve_hosts.internal_cidr }}"
via: "{{ nebula.clients.ingress.ip }}" via: "{{ nebula.clients.ingress.ip }}"
{% endif %} {% endif %}

View file

@ -36,8 +36,8 @@
dest: /etc/nebula/{{ item }} dest: /etc/nebula/{{ item }}
mode: "0600" mode: "0600"
loop: loop:
- "{{ ansible_fqdn }}.key" - "{{ ansible_hostname }}.key"
- "{{ ansible_fqdn }}.crt" - "{{ ansible_hostname }}.crt"
become: true become: true
notify: restart nebula notify: restart nebula
@ -63,4 +63,4 @@
jump: MASQUERADE jump: MASQUERADE
notify: persist iptables notify: persist iptables
become: true become: true
when: ansible_fqdn == "ingress" when: ansible_hostname == "ingress"