{% set dhcp_probe__tpl_interfaces = [] %}
{% for element in ansible_interfaces %}
{%   if element.startswith(('bond', 'br', 'en', 'eth', 'mesh', 'sit', 'sl', 'tap', 'tun', 'vlan', 'wl', 'ww')) %}
{%     if hostvars[inventory_hostname]['ansible_' + element]['ipv4'] is defined %}
{%       set _ = dhcp_probe__tpl_interfaces.append({
  'name': element,
  'state': 'present'
}) %}
{%     endif %}
{%   endif %}
{% endfor %}
{{ dhcp_probe__tpl_interfaces | to_yaml }}
