bundles/dhcpd: adjust indentation in dhcpd.conf

This commit is contained in:
Franzi 2020-11-15 12:00:58 +01:00
parent f6dafbc78e
commit cdef8cdb13
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -7,21 +7,22 @@ ddns-update-style none;
authoritative; authoritative;
% for identfier, subnet in dhcp_config.get('subnets', {}).items(): % for identifier, subnet in dhcp_config.get('subnets', {}).items():
# subnet '${identifier}'
subnet ${subnet['subnet']} netmask ${subnet['netmask']} { subnet ${subnet['subnet']} netmask ${subnet['netmask']} {
% if subnet.get('range_lower', None) and subnet.get('range_higher', None): % if subnet.get('range_lower', None) and subnet.get('range_higher', None):
range ${subnet['range_lower']} ${subnet['range_higher']}; range ${subnet['range_lower']} ${subnet['range_higher']};
% endif % endif
interface "${subnet['interface']}"; interface "${subnet['interface']}";
default-lease-time ${subnet.get('default-lease-time', 600)}; default-lease-time ${subnet.get('default-lease-time', 600)};
max-lease-time ${subnet.get('max-lease-time', 3600)}; max-lease-time ${subnet.get('max-lease-time', 3600)};
% for option, value in sorted(subnet.get('options', {}).items()): % for option, value in sorted(subnet.get('options', {}).items()):
% if re.match('([^0-9\.,\ ])', value): % if re.match('([^0-9\.,\ ])', value):
option ${option} "${value}"; option ${option} "${value}";
% else: % else:
option ${option} ${value}; option ${option} ${value};
% endif % endif
% endfor % endfor
} }
% endfor % endfor