summaryrefslogtreecommitdiffstats
path: root/roles/network/templates/resolved.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/network/templates/resolved.conf.j2')
-rw-r--r--roles/network/templates/resolved.conf.j210
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/network/templates/resolved.conf.j2 b/roles/network/templates/resolved.conf.j2
index cccffff1..5d70fb96 100644
--- a/roles/network/templates/resolved.conf.j2
+++ b/roles/network/templates/resolved.conf.j2
@@ -1,10 +1,18 @@
[Resolve]
+{% if not (network_ipv4_dns is defined or network_ipv6_dns is defined) %}
+# Only set global DNS (and DoT) if not using Pi-hole
# cloudflare-dns.com
DNS=1.1.1.1 2606:4700:4700::1111
# dns.google
FallbackDNS=8.8.8.8 2001:4860:4860::8888
-DNSSEC=yes
DNSOverTLS=yes
+DNSSEC=yes
+{% else %}
+# NetworkManager will provide DNS via Pi-hole, no global DNS needed
+# Pi-hole doesn't support DoT/DNSSEC
+DNSOverTLS=no
+DNSSEC=no
+{% endif %}
# use interface-specific DNS when available but fall back to global (required for VPN DNS to work)
Domains=~.