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 %}