dhcpd: Fix static hosts for iot and lan gateways

This commit is contained in:
Timo Makinen 2025-06-21 16:04:01 +00:00
parent e55dd35605
commit d5d6176b13

View file

@ -50,7 +50,7 @@ subnet {{ intnet | ansible.utils.ipaddr('network') }} netmask {{ intnet | ansibl
{% for hostname in hostvars %} {% for hostname in hostvars %}
{% if hostvars[hostname]['network_interfaces'] is defined %} {% if hostvars[hostname]['network_interfaces'] is defined %}
{% for interface in hostvars[hostname]['network_interfaces'] %} {% 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 %} {% if interface['ipaddr'] is defined %}
{% set ipaddr = interface['ipaddr'] %} {% set ipaddr = interface['ipaddr'] %}
{% else %} {% else %}