diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-11 09:21:11 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-11 09:21:11 +0100 |
| commit | 8485fb4f58995937ba7b0a3104ee998fe8aea4b0 (patch) | |
| tree | ff41ef33e771774e584a03baba0d0433c1f30155 /ansible | |
| parent | 6972d4799af8849fb3ea9c884da00cb900f41973 (diff) | |
fix mox ipv6 config
Diffstat (limited to 'ansible')
| -rw-r--r-- | ansible/roles/mox/templates/mox.conf | 14 | ||||
| -rw-r--r-- | ansible/vars/network.yml | 7 |
2 files changed, 10 insertions, 11 deletions
diff --git a/ansible/roles/mox/templates/mox.conf b/ansible/roles/mox/templates/mox.conf index c3367cc..489ef02 100644 --- a/ansible/roles/mox/templates/mox.conf +++ b/ansible/roles/mox/templates/mox.conf @@ -14,15 +14,15 @@ Listeners: Enabled: true public: IPs: -{% if "address" in ansible_facts.default_ipv4 %} - - {{ ansible_facts.default_ipv4.address }} -{% endif %} -{% if "address" in ansible_facts.default_ipv6 %} - - {{ ansible_facts.default_ipv6.address }} -{% endif %} +{% for interface in ansible_facts.interfaces | reject("eq", "lo") %} + - {{ ansible_facts[interface].ipv4.address }} +{% for ipv6 in ansible_facts[interface].ipv6 | selectattr("scope", "eq", "global") %} + - {{ ipv6.address }} +{% endfor %} +{% endfor %} NATIPs: - {{ router.wan.ipv4 }} - - {{ router.wan.ipv6 }} + - {{ ansible_facts.default_ipv6.address }} AccountHTTPS: Enabled: true AdminHTTPS: diff --git a/ansible/vars/network.yml b/ansible/vars/network.yml index 2943048..a08e4be 100644 --- a/ansible/vars/network.yml +++ b/ansible/vars/network.yml @@ -1,7 +1,6 @@ router: lan: - ipv4: 192.168.0.0/16 # TODO: gather automatically using ip addr - ipv6: fdc9:6aec:7a18::/64 # TODO: gather automatically using ip addr + ipv4: 192.168.0.0/16 + ipv6: fdc9:6aec:7a18::/64 wan: - ipv4: 217.155.190.42 # TODO: gather automatically using ip addr - ipv6: fdc9:6aec:7a18:0:2e0:4cff:fe61:9b17 # TODO: gather automatically using ip addr + ipv4: 217.155.190.42 |
