29 lines
779 B
Text
29 lines
779 B
Text
|
{{ ansible_managed | comment }}
|
||
|
|
||
|
default-lease-time {{ dhcpd__default_lease_time }};
|
||
|
max-lease-time {{ dhcpd__max_lease_time }};
|
||
|
|
||
|
ddns-update-style none;
|
||
|
|
||
|
authoritative;
|
||
|
|
||
|
{% if dhcpd__dns_servers | default([]) %}
|
||
|
option domain-name-servers {{ dhcpd__dns_servers | join(", ") }};
|
||
|
{% endif %}
|
||
|
|
||
|
{% if dhcpd__domain_search | default([]) %}
|
||
|
option domain-search {{ dhcpd__domain_search | map("enquote") | join(", ") }};
|
||
|
{% endif %}
|
||
|
|
||
|
{% for subnet in dhcpd__subnets %}
|
||
|
subnet {{ subnet.network
|
||
|
| ansible.utils.ipaddr("network") }}
|
||
|
netmask {{ subnet.network
|
||
|
| ansible.utils.ipaddr("netmask") }} {
|
||
|
range {{ subnet.start }} {{ subnet.end }};
|
||
|
{% if subnet.routers | default([]) %}
|
||
|
option routers {{ subnet.routers | join(", ") }};
|
||
|
{% endif %}
|
||
|
}
|
||
|
{% endfor %}
|