bundles/dhcpd add initial items, metadata and template
This commit is contained in:
parent
6ba0f6df1d
commit
dcf944b198
6 changed files with 87 additions and 0 deletions
26
bundles/dhcpd/files/dhcpd.conf
Normal file
26
bundles/dhcpd/files/dhcpd.conf
Normal file
|
@ -0,0 +1,26 @@
|
|||
#dhcpd.conf
|
||||
|
||||
ddns-update-style none;
|
||||
|
||||
authoritative;
|
||||
|
||||
% for identfier, subnet in dhcp_config.get('subnets', {}).items():
|
||||
subnet ${subnet['subnet']} netmask ${subnet['netmask']} {
|
||||
% if subnet.get('range_lower', None) and subnet.get('range_higher', None):
|
||||
range ${subnet['range_lower']} ${subnet['range_higher']};
|
||||
% endif
|
||||
interface ${subnet['interface']};
|
||||
default-lease-time ${subnet.get('default-lease-time', 600)};
|
||||
max-lease-time ${subnet.get('max-lease-time', 3600)};
|
||||
% for option, value in sorted(subnet.get('options', {}).items()):
|
||||
option ${option} ${value};
|
||||
% endfor
|
||||
}
|
||||
% endfor
|
||||
|
||||
% for identifier, allocation in dhcp_config.get('fixed_allocations', {}).items():
|
||||
host ${identifier} {
|
||||
hardware ethernet ${allocation['mac']};
|
||||
fixed-address ${allocation['ipv4']};
|
||||
}
|
||||
% endfor
|
Loading…
Add table
Add a link
Reference in a new issue