dhcpd: Read printers from LDAP
This commit is contained in:
parent
45557e0bc1
commit
a935deb439
2 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue