2021-07-16 09:31:05 -05:00
|
|
|
[group:isc-dhcp-relay]
|
|
|
|
programs=
|
|
|
|
{%- set add_preceding_comma = { 'flag': False } %}
|
|
|
|
{# Append DHCPv4 agents #}
|
2021-11-18 11:40:48 -06:00
|
|
|
{% if ipv4_num_relays.count > 0 %}
|
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
|
|
|
{% if add_preceding_comma.flag %},{% endif %}
|
|
|
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
|
|
|
isc-dhcpv4-relay-{{ vlan_name }}
|
|
|
|
{%- endif %}
|
2021-11-18 11:40:48 -06:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{# Append DHCPv6 agent #}
|
|
|
|
{% if ipv6_num_relays.count > 0 %}
|
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
|
2021-11-18 11:40:48 -06:00
|
|
|
{% set _dummy = v6_vlan_list.append( vlan_name ) %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
2021-11-18 11:40:48 -06:00
|
|
|
{% if add_preceding_comma.flag %},{% endif %}
|
|
|
|
isc-dhcpv6-relay-{{ v6_vlan_list|join("-") }}
|
|
|
|
{% endif %}
|