Timotej Lazar
99aef43574
Really quite shoddy as it is right now. Should get better once the old server is retired.
13 lines
607 B
Django/Jinja
13 lines
607 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 }}"
|
|
OPTIONS=""
|
|
{% else %}
|
|
INTF_CMD="{{ my_vlans | map('regex_replace', '^', '-id bridge.') | join(' ') }} -U bridge.{{ my_prefix.vlan.vid }}"
|
|
OPTIONS="--giaddr-src"
|
|
{% endif %}
|