aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dnsmasq
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-02-11 09:30:29 -0500
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-02-11 09:30:29 -0500
commitf132eb66318f5779bb88b179c46237dc3aaf8a46 (patch)
treed9b4223ad6e69659e5078e59be693993922cb521 /roles/dnsmasq
parent8adc2f20194062ef7014bf4f8c6200cc70ceaa46 (diff)
downloadselfhosted-f132eb66318f5779bb88b179c46237dc3aaf8a46.tar.gz
selfhosted-f132eb66318f5779bb88b179c46237dc3aaf8a46.zip
dnsmasq: add docs
Diffstat (limited to 'roles/dnsmasq')
-rw-r--r--roles/dnsmasq/README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/roles/dnsmasq/README.md b/roles/dnsmasq/README.md
new file mode 100644
index 0000000..ed1716b
--- /dev/null
+++ b/roles/dnsmasq/README.md
@@ -0,0 +1,41 @@
+dnsmasq
+=======
+
+Description
+-----------
+
+The `dnsmasq` role configures NetworkManager to use [dnsmasq](https://thekelleys.org.uk/dnsmasq/doc.html)
+for local DNS caching.
+
+
+Variables
+---------
+
+This role **accepts** the following variables:
+
+Variable | Default | Description
+-------------------------|--------------------------|------------
+`dnsmasq_nameservers` | `{{ vlan.dns_servers }}` | Upstream DNS servers
+`dnsmasq_searchdomain` | `{{ domain }}` | Default search domain
+`dnsmasq_resolv_options` | `['rotate']` | List of `resolv.conf(5)` options
+`dnsmasq_cache_size` | 1000 | Number of records to cache
+`dnsmasq_negcache` | no | Enable caching of `NXDOMAIN` responses
+`dnsmasq_all_servers` | yes | Query all nameservers simultaneously (first response wins)
+
+
+Usage
+-----
+
+Example playbook:
+
+````yaml
+- name: configure local DNS caching
+ hosts: all
+ roles:
+ - role: dnsmasq
+ vars:
+ dnsmasq_nameservers:
+ - 10.10.10.1
+ - 10.10.10.2
+ dnsmasq_searchdomain: example.com
+````