add default hostname option

master
vincent 9 months ago
parent 5fd202ae8e
commit e2a4b6df99
  1. 5
      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 }};

Loading…
Cancel
Save