diff --git a/templates/etc/dhcp/macros.j2 b/templates/etc/dhcp/macros.j2 index 2a77d02..cf546c6 100644 --- a/templates/etc/dhcp/macros.j2 +++ b/templates/etc/dhcp/macros.j2 @@ -147,6 +147,7 @@ host {{ host.hostname }}-hw{{ loop.index }} { {% if not host.options is defined or (host.options and not 'host-name' in host.options) %} option host-name "{{ host.hostname }}"; {% endif %} + ddns-hostname "{{ host.hostname }}"; {% if host.address is defined and host.address %} fixed-address {{ host.address }}; {% endif %} @@ -160,6 +161,10 @@ host {{ host.hostname }} { {% if host.ethernet is defined and host.ethernet %} hardware ethernet {{ host.ethernet }}; {% endif %} +{% if not host.options is defined or (host.options and not 'host-name' in host.options) %} + option host-name "{{ host.hostname }}"; +{% endif %} + ddns-hostname "{{ host.hostname }}"; {% if host.address is defined and host.address %} {% if dhcpd_ipversion is defined and dhcpd_ipversion == '6' %} fixed-address6 {{ host.address }};