12 lines
584 B
Django/Jinja
12 lines
584 B
Django/Jinja
{% set my_server = item.0 %}
|
|
{% set my_vlans = item.1 | map(attribute='vlan.vid') | sort %}
|
|
{% set my_prefix = prefixes | selectattr("prefix", "==", my_server | ipaddr("network/prefix")) | first -%}
|
|
|
|
SERVERS="{{ my_server | ipaddr('address') }}"
|
|
{% if my_prefix.vrf.name == 'outside' %}
|
|
INTF_CMD="{{ my_vlans | map('regex_replace', '^', '-id bridge.') | join(' ') }} -iu {{ iface_uplink }} -iu peerlink.4 -U {{ my_prefix.vrf.name }}"
|
|
{% else %}
|
|
INTF_CMD="{{ my_vlans | map('regex_replace', '^', '-id bridge.') | join(' ') }} -U bridge.{{ my_prefix.vlan.vid }}"
|
|
{% endif %}
|
|
OPTIONS=""
|