From d5d6176b13e1133e6fd7c4c79d55c92aeeb8e6ac Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sat, 21 Jun 2025 16:04:01 +0000 Subject: [PATCH] dhcpd: Fix static hosts for iot and lan gateways --- roles/dhcpd/templates/dhcpd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dhcpd/templates/dhcpd.conf.j2 b/roles/dhcpd/templates/dhcpd.conf.j2 index ea77174..400b3c6 100644 --- a/roles/dhcpd/templates/dhcpd.conf.j2 +++ b/roles/dhcpd/templates/dhcpd.conf.j2 @@ -50,7 +50,7 @@ subnet {{ intnet | ansible.utils.ipaddr('network') }} netmask {{ intnet | ansibl {% for hostname in hostvars %} {% if hostvars[hostname]['network_interfaces'] is defined %} {% for interface in hostvars[hostname]['network_interfaces'] %} -{% if interface['vlan'] == 20 and interface['mac'] is defined %} +{% if interface['vlan'] == network_interfaces[0].vlan and interface['mac'] is defined %} {% if interface['ipaddr'] is defined %} {% set ipaddr = interface['ipaddr'] %} {% else %}