dhcpd: Read printers from LDAP

This commit is contained in:
Timo Makinen 2025-01-31 19:12:06 +00:00
parent 45557e0bc1
commit a935deb439
2 changed files with 7 additions and 4 deletions

View file

@ -29,10 +29,12 @@ shared-network PRINTNET {
use-host-decl-names on;
}
host hp1.print.foo.sh {
option host-name "hp1.print.foo.sh";
hardware ethernet 00:15:99:22:79:46;
fixed-address 172.20.24.101;
{% for host in ldap_hosts.results %}
host {{ host['cn'] }} {
option host-name "{{ host['cn'] }}";
hardware ethernet {{ host['macAddress'] }};
fixed-address {{ host['ipHostNumber'] }};
}
{% endfor %}
}