2021-09-22 18:05:03 -05:00
[group:dhcp-relay]
2021-07-16 09:31:05 -05:00
programs=
2022-06-04 13:37:04 -05:00
{%- set relay_for_ipv6 = { 'flag': False } %}
2021-07-16 09:31:05 -05:00
{%- set add_preceding_comma = { 'flag': False } %}
2023-11-02 10:09:01 -05:00
{% if dhcp_server_ipv4_enabled %}
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
dhcprelayd
{%- endif %}
2021-07-16 09:31:05 -05:00
{% for vlan_name in VLAN_INTERFACE %}
{# Append DHCPv4 agents #}
2023-11-02 10:09:01 -05:00
{% if not dhcp_server_ipv4_enabled and VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
2021-07-16 09:31:05 -05:00
{% if add_preceding_comma.flag %},{% endif %}
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
isc-dhcpv4-relay-{{ vlan_name }}
{%- endif %}
2022-06-04 13:37:04 -05:00
{% 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 %}
2021-07-16 09:31:05 -05:00
{# Append DHCPv6 agents #}
2022-06-04 13:37:04 -05:00
{% if relay_for_ipv6.flag %}
2021-07-16 09:31:05 -05:00
{% if add_preceding_comma.flag %},{% endif %}
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
2021-09-22 18:05:03 -05:00
dhcp6relay
2022-06-04 13:37:04 -05:00
{% endif %}