Add dhcpd to nms hosts
This commit is contained in:
parent
1aaf78c3ab
commit
c2a39ecc56
3 changed files with 47 additions and 0 deletions
40
roles/dhcpd/templates/dhcpd.conf.oob.j2
Normal file
40
roles/dhcpd/templates/dhcpd.conf.oob.j2
Normal file
|
@ -0,0 +1,40 @@
|
|||
|
||||
authorative;
|
||||
ddns-update-style none;
|
||||
|
||||
# logging
|
||||
on commit {
|
||||
log(info,
|
||||
concat("Client ",
|
||||
binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
|
||||
" requests ",
|
||||
binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
|
||||
" - ",
|
||||
pick-first-value(option vendor-class-identifier, "no vendor-id"),
|
||||
" - ",
|
||||
pick-first-value(option user-class, "no user-class"))
|
||||
);
|
||||
}
|
||||
|
||||
shared-network OOBNET {
|
||||
|
||||
subnet 172.20.25.0 netmask 255.255.255.0 {
|
||||
default-lease-time 86400;
|
||||
max-lease-time 604800;
|
||||
option subnet-mask 255.255.255.0;
|
||||
option broadcast-address 172.20.25.255;
|
||||
|
||||
option domain-name "oob.foo.sh";
|
||||
option domain-name-servers 172.20.25.1, 172.20.25.2, 172.20.25.3;
|
||||
use-host-decl-names on;
|
||||
}
|
||||
|
||||
{% 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