dhcpd: fix conf syntax
This commit is contained in:
parent
bf5ca0cfb5
commit
bd6a964012
|
@ -3,16 +3,12 @@
|
||||||
{%- if iface not in ['core', 'lo'] and pillar['subnets-inet'].get(iface) %}
|
{%- if iface not in ['core', 'lo'] and pillar['subnets-inet'].get(iface) %}
|
||||||
group {
|
group {
|
||||||
{%- set conf = pillar['dhcp'][iface] %}
|
{%- set conf = pillar['dhcp'][iface] %}
|
||||||
{%- set subnet = pillar['subnets-inet'][iface] %}
|
|
||||||
subnet {{ subnet.split('/')[0] }} netmask {{ netmasks[subnet.split('/')[1]] }} {
|
|
||||||
authoritative;
|
|
||||||
default-lease-time {{ conf['time'] }};
|
default-lease-time {{ conf['time'] }};
|
||||||
max-lease-time {{ conf['max-time'] }};
|
max-lease-time {{ conf['max-time'] }};
|
||||||
{%- if conf.get('lower-max-time') and conf.get('time') %}
|
{%- if conf.get('lower-max-time') and conf.get('time') %}
|
||||||
min-lease-time {{ conf['time'] }};
|
min-lease-time {{ conf['time'] }};
|
||||||
adaptive-lease-time-threshold {{ conf['lower-max-time'] }};
|
adaptive-lease-time-threshold {{ conf['lower-max-time'] }};
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
range {{ conf['start'] }} {{ conf['end'] }};
|
|
||||||
{%- for name, value in (conf.get('opts') or {}).items() %}
|
{%- for name, value in (conf.get('opts') or {}).items() %}
|
||||||
option {{ name }} {{ value }};
|
option {{ name }} {{ value }};
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
@ -24,6 +20,11 @@ group {
|
||||||
{%- for name, value in (conf.get('string-opts') or {}).items() %}
|
{%- for name, value in (conf.get('string-opts') or {}).items() %}
|
||||||
option {{ name }} "{{ value }}";
|
option {{ name }} "{{ value }}";
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
{%- set subnet = pillar['subnets-inet'][iface] %}
|
||||||
|
subnet {{ subnet.split('/')[0] }} netmask {{ netmasks[subnet.split('/')[1]] }} {
|
||||||
|
authoritative;
|
||||||
|
range {{ conf['start'] }} {{ conf['end'] }};
|
||||||
}
|
}
|
||||||
|
|
||||||
{%- for addr, hwaddr in (conf.get('fixed-hosts') or {}).items() %}
|
{%- for addr, hwaddr in (conf.get('fixed-hosts') or {}).items() %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user