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

@ -23,5 +23,6 @@ firewall_raw:
- "-A INPUT -i eth1 -d 224.0.0.0/8 -j ACCEPT"
- "-A INPUT -i eth1 -p vrrp -j ACCEPT"
dhcpd_ldap_filter: "(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.print.foo.sh))"
sssd_allow_groups:
- sysadm

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 %}
}