dhcpd: Move host declarations to global section

No need to set host declarations in subnet or shared-network since
they are always global and it gives warning during startup:

WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
This commit is contained in:
Timo Makinen 2025-06-13 13:50:03 +00:00
parent e409252eba
commit ea3c05c2b5
4 changed files with 24 additions and 32 deletions

View file

@ -17,7 +17,6 @@ on commit {
}
shared-network CAMNET {
subnet 172.20.26.0 netmask 255.255.255.0 {
default-lease-time 86400;
max-lease-time 604800;
@ -28,13 +27,12 @@ shared-network CAMNET {
option domain-name-servers 172.20.26.1, 172.20.26.2, 172.20.26.3;
use-host-decl-names on;
}
}
{% for host in ldap_hosts.results %}
host {{ host['cn'] }} {
option host-name "{{ host['cn'] }}";
hardware ethernet {{ host['macAddress'] }};
fixed-address {{ host['ipHostNumber'] }};
}
{% endfor %}
host {{ host['cn'] }} {
option host-name "{{ host['cn'] }}";
hardware ethernet {{ host['macAddress'] }};
fixed-address {{ host['ipHostNumber'] }};
}
{% endfor %}