2017-09-10 23:56:34 +02:00
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
|
|
|
|
2019-03-19 15:23:12 +01:00
|
|
|
{% for network in my_wireguard_networks %}
|
|
|
|
protocol bgp mwu_{{ network.remote }} from ibgp_mwu {
|
|
|
|
{% if magic < network.remote_magic %}
|
|
|
|
source address {{ network.ipv4 | ipaddr('address') }};
|
|
|
|
neighbor {{ network.ipv4 | ipaddr('1') | ipaddr('address') }} as mwu_as;
|
|
|
|
{% else %}
|
|
|
|
source address {{ network.ipv4 | ipaddr('1') | ipaddr('address') }};
|
|
|
|
neighbor {{ network.ipv4 | ipaddr('address') }} as mwu_as;
|
|
|
|
{% endif %}
|
2018-02-23 22:27:54 +01:00
|
|
|
};
|
|
|
|
|
2018-09-09 10:26:23 +02:00
|
|
|
{% endfor %}
|
2019-03-19 15:23:12 +01:00
|
|
|
|
|
|
|
{% if server_type == 'gateway' %}
|
2019-03-02 18:10:48 +01:00
|
|
|
{% for item, value in bgp_legacy_servers.items() %}
|
2017-09-10 23:56:34 +02:00
|
|
|
{% if item != inventory_hostname_short %}
|
2019-03-19 15:23:12 +01:00
|
|
|
protocol bgp mwu_{{ item }}_legacy from ibgp_mwu {
|
|
|
|
source address mwu_address_legacy;
|
2017-09-10 23:56:34 +02:00
|
|
|
neighbor {{ value.ipv4 }} as mwu_as;
|
|
|
|
};
|
|
|
|
|
2018-02-23 22:27:54 +01:00
|
|
|
{% endif %}
|
2017-09-10 23:56:34 +02:00
|
|
|
{% endfor %}
|
2019-03-19 15:23:12 +01:00
|
|
|
{% endif %}
|