summaryrefslogtreecommitdiffstats
path: root/roles/common/templates
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-01-28 14:26:18 +0100
committerGuilhem Moulin <guilhem@fripost.org>2025-01-28 14:26:18 +0100
commit20cd6ac5299a725558a85df7c93c34f4a67b15d5 (patch)
treef5ed4fc68e9ff8b4e4f44db249285c7e0d5331d8 /roles/common/templates
parentbcae4845763a067cafaeb672f173ed810bacb242 (diff)
Resolver: Use systemd-resolved.
Diffstat (limited to 'roles/common/templates')
-rw-r--r--roles/common/templates/etc/systemd/resolved.conf.d/local.conf.j211
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/common/templates/etc/systemd/resolved.conf.d/local.conf.j2 b/roles/common/templates/etc/systemd/resolved.conf.d/local.conf.j2
new file mode 100644
index 0000000..044170a
--- /dev/null
+++ b/roles/common/templates/etc/systemd/resolved.conf.d/local.conf.j2
@@ -0,0 +1,11 @@
+[Resolve]
+LLMNR=no
+{% if ansible_processor[1] is search('^(Genuine)?Intel.*') and not ansible_virtualization_role == 'guest' %}
+DNS=127.0.0.1
+# Quad9
+FallbackDNS=9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
+{% else %}
+# Quad9
+DNS=9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
+{% endif %}
+Domains=fripost.org