aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dnsmasq/README.md
blob: ed1716b8458f7f9e13661f6c3e3f586cf5ddbea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
````