[group:dhcp-relay] programs=dhcprelayd, {%- set relay_for_ipv6 = { 'flag': False } %} {%- set add_preceding_comma = { 'flag': False } %} {% if dhcp_server_ipv4_enabled %} {%- endif %} {% for vlan_name in VLAN_INTERFACE %} {% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% set _dummy = relay_for_ipv6.update({'flag': True}) %} {%- endif %} {% endfor %} {# Append DHCPv6 agents #} {% if relay_for_ipv6.flag %} {% if add_preceding_comma.flag %},{% endif %} {% set _dummy = add_preceding_comma.update({'flag': True}) %} dhcp6relay {% endif %}