aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dnsmasq/templates/etc/NetworkManager
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-02-04 01:23:43 -0500
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-02-04 01:52:13 -0500
commit0261e875679f1bf63c8d689da7fc7e014597885d (patch)
tree3f19cd74a0c1070944f75437f30b098d6ef2ffcb /roles/dnsmasq/templates/etc/NetworkManager
downloadselfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.tar.gz
selfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.zip
initial commit
Diffstat (limited to 'roles/dnsmasq/templates/etc/NetworkManager')
-rw-r--r--roles/dnsmasq/templates/etc/NetworkManager/conf.d/9A-dns.conf.j29
-rw-r--r--roles/dnsmasq/templates/etc/NetworkManager/dnsmasq.d/00-dnsmasq.conf.j27
2 files changed, 16 insertions, 0 deletions
diff --git a/roles/dnsmasq/templates/etc/NetworkManager/conf.d/9A-dns.conf.j2 b/roles/dnsmasq/templates/etc/NetworkManager/conf.d/9A-dns.conf.j2
new file mode 100644
index 0000000..91ae064
--- /dev/null
+++ b/roles/dnsmasq/templates/etc/NetworkManager/conf.d/9A-dns.conf.j2
@@ -0,0 +1,9 @@
+[main]
+dns=dnsmasq
+
+[global-dns]
+searches={{ dnsmasq_searchdomain if dnsmasq_searchdomain is string else (dnsmasq_searchdomain | join(',')) }}
+options={{ dnsmasq_resolv_options if dnsmasq_resolv_options is string else (dnsmasq_resolv_options | join(',')) }}
+
+[global-dns-domain-*]
+servers={{ dnsmasq_nameservers | join(',') }}
diff --git a/roles/dnsmasq/templates/etc/NetworkManager/dnsmasq.d/00-dnsmasq.conf.j2 b/roles/dnsmasq/templates/etc/NetworkManager/dnsmasq.d/00-dnsmasq.conf.j2
new file mode 100644
index 0000000..c87ec98
--- /dev/null
+++ b/roles/dnsmasq/templates/etc/NetworkManager/dnsmasq.d/00-dnsmasq.conf.j2
@@ -0,0 +1,7 @@
+cache-size={{ dnsmasq_cache_size }}
+{% if not dnsmasq_negcache %}
+no-negcache
+{% endif %}
+{% if dnsmasq_all_servers %}
+all-servers
+{% endif %}