forked from mrlesmithjr/ansible-dnsmasq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
153 lines (122 loc) · 4.4 KB
/
main.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
# defaults file for ansible-dnsmasq
# Define specific interfaces to listen on
dnsmasq_bind_interfaces: []
# - "{{ ansible_default_ipv4['interface'] }}"
# - eth0
# - eth1
# Defines if DNSMasq only listens on specific interfaces instead of all interfaces
dnsmasq_bind_listen_only_interfaces: false
# Define specific domain forwarders
dnsmasq_conditional_forwarders:
[]
# - address: 172.16.24.1
# domain: etsbv.internal
# Defines if DNSMASQ should be configured
dnsmasq_config: false
# Define custom domains per subnet, ip range, etc.
dnsmasq_custom_domains:
[]
# - domain: "test.{{ dnsmasq_pri_domain_name }}"
# network:
# - 192.168.0.0/24 # Define as subnet
# # - 192.168.0.100,192.168.1.100 # Define as range
dnsmasq_dhcp_boot: "pxelinux.0,{{ inventory_hostname }},{{ dnsmasq_pri_bind_address }}"
# Define static ip reservations
dnsmasq_dhcp_host_reservations:
[]
# - address: 192.168.0.60
# lease_time: 1h
# mac_address:
# - "11:22:33:44:55:66" # Multiple MAC addresses may be assigned
# # - "12:34:56:78:90:12"
# name: fred
# Define DHCP options to set
dnsmasq_dhcp_options:
[]
# - option: dns-server
# value:
# - 192.168.202.200
# - 192.168.202.201
# # - option: domain-name
# # value:
# # - "another.{{ dnsmasq_pri_domain_name }}"
# - option: domain-search
# value:
# - "dev.{{ dnsmasq_pri_domain_name }}"
# - "prod.{{ dnsmasq_pri_domain_name }}"
# - "test.{{ dnsmasq_pri_domain_name }}"
# - option: ntp-server
# value:
# - 192.168.202.200
# - 192.168.202.201
# - option: router
# value:
# - 192.168.202.1
# Define dhcp scopes to be used if dhcp is enabled
dnsmasq_dhcp_scopes:
[]
# - start: 192.168.1.128
# end: 192.168.1.224
# netmask: 255.255.255.0
# lease_time: 24h # Define a specific lease time if desired..Default is 1h
# interface: eth0 # Define a specific interface to provide scope...not required but useful
# - start: 192.168.2.128
# end: 192.168.2.224
# netmask: 255.255.255.0
# lease_time: 24h
# interface: eth1
# Disables updating resolv.conf to use 127.0.0.1 as the only nameserver
dnsmasq_disable_lo: false
# Define your dns search
dnsmasq_dns_search: "{{ dnsmasq_pri_domain_name }}"
# Define any interface to not listen on
dnsmasq_do_not_listen_on_interfaces:
[]
# - eth0
# Defines if DHCP services are provided by DNSMASQ
dnsmasq_enable_dhcp: false
# Defines if forwarders should be used
dnsmasq_enable_forwarders: true
# Defines if TFTP services are provided by DNSMASQ
dnsmasq_enable_tftp: false
# Never forward addresses in the non-routed address spaces
dnsmasq_forward_nonrouted_addresses: false
# Define listen port for DNS
# Default=53
# Set to 0 to disable DNS
dnsmasq_listen_port: 53
# Define your dns servers
dnsmasq_nameservers:
- 8.8.4.4
- 8.8.8.8
# Define size of the dns cache
# The default is 150 names
dnsmasq_cache_size: 150
# Defines if queries should be logged
dnsmasq_log_queries: false
# Defines location of logfile
dnsmasq_log_facility: /var/log/dnsmasq.log
dnsmasq_pri_bind_address: "{{ ansible_default_ipv4['address'] }}"
dnsmasq_pri_domain_name: example.org
# Defines netmask cidr value
# 255.255.255.0 == 24
dnsmasq_pri_netmask_cidr: 24
dnsmasq_pri_network: "{{ ansible_default_ipv4['network'] }}"
# Defines if you want dnsmasq to read /etc/hosts
dnsmasq_read_etc_hosts: true
# Define if /etc/resolv.conf should be polled for changes
dnsmasq_poll_etc_resolv_conf: true
# Define if /etc/resolv.conf should be read
dnsmasq_read_etc_resolv_conf: true
# Define if dns negative cache should be disable
dnsmasq_disabled_negcache: false
# Define static addresses
dnsmasq_static_addresses:
[]
# - address: 192.168.202.133
# name: node1.test.com
# Defines whether systemd-resolved service should be stopped/disabled
dnsmasq_systemd_resolved_disable: true
# Define tftpboot directory
dnsmasq_tftpboot_dir: /var/lib/tftpboot