diff options
| -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 |
