From 932ee012c61892707078044650a1d7c9b576891e Mon Sep 17 00:00:00 2001 From: Rene Mewissen Date: Wed, 10 Aug 2022 10:52:47 +0200 Subject: [PATCH] do not use ipv6 if no ipv6 is configured --- roles/nameserver/templates/unbound_network.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/nameserver/templates/unbound_network.conf.j2 b/roles/nameserver/templates/unbound_network.conf.j2 index bb0a035..bc54174 100644 --- a/roles/nameserver/templates/unbound_network.conf.j2 +++ b/roles/nameserver/templates/unbound_network.conf.j2 @@ -9,7 +9,9 @@ server: interface: 127.0.0.53 interface: ::1 outgoing-interface: {{ ansible_default_ipv4.address }} + {% if ansible_default_ipv6 is defined %} outgoing-interface: {{ ansible_default_ipv6.address }} + {% endif %} access-control: 192.168.1.0/24 allow access-control: 192.168.3.0/24 allow access-control: 172.16.0.0/24 allow