dhcpd: fix conf syntax
This commit is contained in:
parent
bf5ca0cfb5
commit
bd6a964012
|
@ -2,17 +2,13 @@
|
|||
{%- for iface, ips in salt['grains.get']('ip_interfaces').items() %}
|
||||
{%- if iface not in ['core', 'lo'] and pillar['subnets-inet'].get(iface) %}
|
||||
group {
|
||||
{%- set conf = pillar['dhcp'][iface] %}
|
||||
{%- set subnet = pillar['subnets-inet'][iface] %}
|
||||
subnet {{ subnet.split('/')[0] }} netmask {{ netmasks[subnet.split('/')[1]] }} {
|
||||
authoritative;
|
||||
{%- set conf = pillar['dhcp'][iface] %}
|
||||
default-lease-time {{ conf['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'] }};
|
||||
adaptive-lease-time-threshold {{ conf['lower-max-time'] }};
|
||||
{%- endif %}
|
||||
range {{ conf['start'] }} {{ conf['end'] }};
|
||||
{%- endif %}
|
||||
{%- for name, value in (conf.get('opts') or {}).items() %}
|
||||
option {{ name }} {{ value }};
|
||||
{%- endfor %}
|
||||
|
@ -24,6 +20,11 @@ group {
|
|||
{%- for name, value in (conf.get('string-opts') or {}).items() %}
|
||||
option {{ name }} "{{ value }}";
|
||||
{%- 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() %}
|
||||
|
|
Loading…
Reference in New Issue