# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
{% if dhcpd_interfaces is defined and dhcpd_interfaces %}
INTERFACES="{{ dhcpd_interfaces | join(' ') }}"
{% else %}
{% set dhcpd_tpl_interfaces = [] %}
{% for interface in ansible_interfaces %}
{% if interface != 'lo' and ((hostvars[inventory_hostname]['ansible_'+interface].ipv4 is defined and hostvars[inventory_hostname]['ansible_'+interface].ipv4) or (hostvars[inventory_hostname]['ansible_'+interface].ipv6 is defined and hostvars[inventory_hostname]['ansible_'+interface].ipv6)) %}
{% if dhcpd_tpl_interfaces.append(interface) %}{% endif %}