From a026b6e960f7b3a150162610b79060f5bc5a4082 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Thu, 15 Dec 2016 23:03:13 +0100 Subject: [PATCH] if a threshold is defined, use it --- salt/dhcp/dhcpd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/dhcp/dhcpd.conf b/salt/dhcp/dhcpd.conf index 3614885..e19731a 100644 --- a/salt/dhcp/dhcpd.conf +++ b/salt/dhcp/dhcpd.conf @@ -8,7 +8,7 @@ subnet {{ subnet.split('/')[0] }} netmask {{ netmasks[subnet.split('/')[1]] }} { authoritative; default-lease-time {{ conf['time'] }}; max-lease-time {{ conf['max-time'] }}; - {%- if iface in ['pub'] %} + {%- if conf.get('lower-max-time') and conf.get('time') %} min-lease-time {{ conf['time'] }}; adaptive-lease-time-threshold {{ conf['lower-max-time'] }}; {%- endif %}