Get IP cameras from LDAP
This commit is contained in:
parent
c95c7d1308
commit
c88f8e6374
2 changed files with 8 additions and 4 deletions
|
@ -16,6 +16,8 @@ unbound_zones:
|
|||
- 26.20.172.in-addr.arpa
|
||||
- cam.foo.sh
|
||||
dhcpd_template: dhcpd.conf.cam.j2
|
||||
dhcpd_ldap_filter: >-
|
||||
(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.cam.foo.sh))
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue