roles/dhcpd: Allow disabling DDNS per-subnet
In some cases, DDNS may be enabled globally, but some subnets may not utilize it. To support this scenario, subnets can set `ddns_updates` to false.jenkins-master
parent
40e9573f57
commit
efc78f0db6
|
@ -50,7 +50,9 @@ subnet {{ subnet.address|ipv4('network') }} netmask {{ subnet.address|ipv4('netm
|
||||||
filename "{{ subnet.boot_filename }}";
|
filename "{{ subnet.boot_filename }}";
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if subnet.dynamic_hostnames|d|bool %}
|
{% if not subnet.ddns_updates|d(true)|bool %}
|
||||||
|
ddns-updates off;
|
||||||
|
{% elif subnet.dynamic_hostnames|d|bool %}
|
||||||
option host-name = {{ dyn_hostname_expr.format(prefix=subnet.dyn_hostname_prefix|d(default_dyn_hostname_prefix)) }};
|
option host-name = {{ dyn_hostname_expr.format(prefix=subnet.dyn_hostname_prefix|d(default_dyn_hostname_prefix)) }};
|
||||||
ddns-hostname = {{ dyn_hostname_expr.format(prefix=subnet.dyn_hostname_prefix|d(default_dyn_hostname_prefix)) }};
|
ddns-hostname = {{ dyn_hostname_expr.format(prefix=subnet.dyn_hostname_prefix|d(default_dyn_hostname_prefix)) }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue