Get IP cameras from LDAP

This commit is contained in:
Timo Makinen 2025-04-20 16:21:25 +00:00
parent c95c7d1308
commit c88f8e6374
2 changed files with 8 additions and 4 deletions

View file

@ -29,10 +29,12 @@ shared-network CAMNET {
use-host-decl-names on;
}
host ipcam01.cam.foo.sh {
option host-name "ipcam01.cam.foo.sh";
hardware ethernet ec:71:db:6e:bc:0f;
fixed-address 172.20.26.101;
{% for host in ldap_hosts.results %}
host {{ host['cn'] }} {
option host-name "{{ host['cn'] }}";
hardware ethernet {{ host['macAddress'] }};
fixed-address {{ host['ipHostNumber'] }};
}
{% endfor %}
}