dhcpd: Add extra hosts from LDAP to config
This commit is contained in:
parent
ad81c46228
commit
4b4ba7a814
2 changed files with 12 additions and 0 deletions
|
@ -52,6 +52,10 @@ firewall_src: pf.conf.gw_dna.j2
|
||||||
# unbound config
|
# unbound config
|
||||||
unbound_config: unbound.conf.dna.j2
|
unbound_config: unbound.conf.dna.j2
|
||||||
|
|
||||||
|
# get extra hosts from ldap
|
||||||
|
dhcpd_ldap_filter: >-
|
||||||
|
(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.{{ intdomain }}))
|
||||||
|
|
||||||
# ifstated config
|
# ifstated config
|
||||||
ifstated_config: ifstated-dna.conf.j2
|
ifstated_config: ifstated-dna.conf.j2
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,11 @@ host {{ hostname }} {
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% 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
Add a link
Reference in a new issue