From 5069f17bbd3c4d4bafb557136cd7395b320f0af9 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Wed, 10 Feb 2021 22:36:35 +0100 Subject: [PATCH] correctly set the fixed-address --- salt-pillar/dhcp/init.sls | 5 ++++- salt/dhcp/dhcpd.conf | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/salt-pillar/dhcp/init.sls b/salt-pillar/dhcp/init.sls index 5c74983..bb3f010 100644 --- a/salt-pillar/dhcp/init.sls +++ b/salt-pillar/dhcp/init.sls @@ -293,7 +293,7 @@ dhcp: domain-name: priv22.zentralwerk.org priv23: - start: 172.20.73.162 + start: 172.20.73.164 end: 172.20.73.190 time: 120 max-time: 86400 @@ -303,6 +303,9 @@ dhcp: routers: priv23-gw.priv23 string-opts: domain-name: priv23.zentralwerk.org + fixed-hosts: + 172.20.73.162: da:2c:3a:2c:87:22 + 172.20.73.163: ca:9f:27:b2:bf:6d priv24: start: 172.20.74.242 diff --git a/salt/dhcp/dhcpd.conf b/salt/dhcp/dhcpd.conf index 2fc8d24..d1a109b 100644 --- a/salt/dhcp/dhcpd.conf +++ b/salt/dhcp/dhcpd.conf @@ -28,7 +28,10 @@ group { } {%- for addr, hwaddr in (conf.get('fixed-hosts') or {}).items() %} - host {{ addr }} { hardware ethernet {{ hwaddr }}; } + host {{ addr }} { + hardware ethernet {{ hwaddr }}; + fixed-address {{ addr }}; + } {%- endfor %} }