1 | # |
---|
2 | # dnsmasq configuration |
---|
3 | # |
---|
4 | |
---|
5 | <% if dhcp_range != 'absent' -%> |
---|
6 | # This to enable the integrated DHCP server, you need |
---|
7 | # to supply the range of addresses available for lease and optionally |
---|
8 | # a lease time. If you have more than one network, you will need to |
---|
9 | # repeat this for each network on which you want to supply DHCP |
---|
10 | # service. |
---|
11 | dhcp-range=<%= dhcp_range %> |
---|
12 | <% end -%> |
---|
13 | |
---|
14 | <% if dhcp_authoritative != 'absent' -%> |
---|
15 | # Set the DHCP server to authoritative mode. In this mode it will barge in |
---|
16 | # and take over the lease for any client which broadcasts on the network, |
---|
17 | # whether it has a record of the lease or not. This avoids long timeouts |
---|
18 | # when a machine wakes up on a new network. |
---|
19 | dhcp-authoritative |
---|
20 | <% end -%> |
---|
21 | |
---|
22 | <% if dhcp_gw != 'absent' -%> |
---|
23 | # Override the default route supplied by dnsmasq, which assumes the |
---|
24 | # router is the same machine as the one running dnsmasq. |
---|
25 | dhcp-option=3,<%= dhcp_gw %> |
---|
26 | <% end -%> |
---|
27 | |
---|
28 | <% if dhcp_nameservers != 'absent' -%> |
---|
29 | # upstream nameserver |
---|
30 | server=<%= dhcp_nameservers %> |
---|
31 | <% end -%> |
---|
32 | |
---|
33 | <% if dhcp_script != 'absent' -%> |
---|
34 | # Run an executable when a DHCP lease is created or destroyed. |
---|
35 | # The arguments sent to the script are "add" or "del", |
---|
36 | # then the MAC address, the IP address and finally the hostname |
---|
37 | # if there is one. |
---|
38 | dhcp-script=<%= dhcp_script %> |
---|
39 | <% end -%> |
---|
40 | |
---|
41 | <% if dhcp_hostsfile != 'absent' -%> |
---|
42 | # This file is puppet here by puppet and the above script is filling |
---|
43 | # it with the mac address,<generatedhostname>. This same file is |
---|
44 | # also used to assign the static ip and hostname to a specific mac |
---|
45 | # address. Take care editing this file. |
---|
46 | dhcp-hostsfile=<%= dhcp_hostsfile %> |
---|
47 | <% end -%> |
---|
48 | |
---|
49 | # |
---|
50 | # dns configuration |
---|
51 | # |
---|
52 | |
---|
53 | # Never forward plain names (without a dot or domain part) |
---|
54 | domain-needed |
---|
55 | # Never forward addresses in the non-routed address spaces. |
---|
56 | bogus-priv |
---|
57 | |
---|
58 | <% if addn_hosts != 'absent' -%> |
---|
59 | # We want to read another file, as well as /etc/hosts, |
---|
60 | # so use this. |
---|
61 | addn-hosts=<%= addn_hosts %> |
---|
62 | <% end -%> |
---|
63 | |
---|
64 | <% if domain != 'absent' -%> |
---|
65 | # Set this (and domain: see below) if you want to have a domain |
---|
66 | # automatically added to simple names in a hosts-file. |
---|
67 | expand-hosts |
---|
68 | # Set the domain for dnsmasq. this is optional, but if it is set, it |
---|
69 | # does the following things. |
---|
70 | # 1) Allows DHCP hosts to have fully qualified domain names, as long |
---|
71 | # as the domain part matches this setting. |
---|
72 | # 2) Sets the "domain" DHCP option thereby potentially setting the |
---|
73 | # domain of all systems configured by DHCP |
---|
74 | # 3) Provides the domain part for "expand-hosts" |
---|
75 | domain=<%= domain %> |
---|
76 | <% end -%> |
---|
77 | |
---|
78 | <% if dhcp_boot != 'absent' -%> |
---|
79 | # The file sent to the tftp client, followed by the |
---|
80 | # tftp servername and ip |
---|
81 | dhcp-boot=<%= dhcp_boot %> |
---|
82 | <% end -%> |
---|
83 | |
---|
84 | <% if tftp_root != 'absent' -%> |
---|
85 | # Set the relative root directory for files availble via TFTP. |
---|
86 | tftp-root=<%= tftp_root %> |
---|
87 | <% end -%> |
---|
88 | |
---|
89 | <% if log_queries != 'absent' -%> |
---|
90 | # For debugging purposes, log each DNS query as it passes through |
---|
91 | # dnsmasq. |
---|
92 | log-queries |
---|
93 | <% end -%> |
---|
94 | |
---|
95 | <% if log_dhcp != 'absent' -%> |
---|
96 | # Log lots of extra information about DHCP transactions. |
---|
97 | log-dhcp |
---|
98 | <% end -%> |
---|