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
|
- 26.20.172.in-addr.arpa
|
||||||
- cam.foo.sh
|
- cam.foo.sh
|
||||||
dhcpd_template: dhcpd.conf.cam.j2
|
dhcpd_template: dhcpd.conf.cam.j2
|
||||||
|
dhcpd_ldap_filter: >-
|
||||||
|
(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.cam.foo.sh))
|
||||||
|
|
||||||
firewall_in:
|
firewall_in:
|
||||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||||
|
|
|
@ -29,10 +29,12 @@ shared-network CAMNET {
|
||||||
use-host-decl-names on;
|
use-host-decl-names on;
|
||||||
}
|
}
|
||||||
|
|
||||||
host ipcam01.cam.foo.sh {
|
{% for host in ldap_hosts.results %}
|
||||||
option host-name "ipcam01.cam.foo.sh";
|
host {{ host['cn'] }} {
|
||||||
hardware ethernet ec:71:db:6e:bc:0f;
|
option host-name "{{ host['cn'] }}";
|
||||||
fixed-address 172.20.26.101;
|
hardware ethernet {{ host['macAddress'] }};
|
||||||
|
fixed-address {{ host['ipHostNumber'] }};
|
||||||
}
|
}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue