diff --git a/roles/nameserver/templates/unbound_network.conf.j2 b/roles/nameserver/templates/unbound_network.conf.j2 index 0681c6b..9ffcdc4 100644 --- a/roles/nameserver/templates/unbound_network.conf.j2 +++ b/roles/nameserver/templates/unbound_network.conf.j2 @@ -1,6 +1,10 @@ server: ip-freebind: yes + {% if wg_local_ip %} interface: {{ wg_local_ip | ipaddr('address') }} + {% else %} + interface: {{ ansible_default_ipv4.address }} + {% endif %} interface: 127.0.0.1 interface: 127.0.0.53 interface: ::1