File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed
Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,8 @@ router bgp {{ bgp.as }}
1515!
1616 address-family {{ af }} unicast
1717!
18- {% if loopback [af ] is defined and bgp .advertise_loopback %}
19- network {{ loopback[af] |ansible.utils.ipaddr(0) }}
20- {% endif %}
21- !
22- {% for l in interfaces |default ([]) if l .bgp .advertise |default ("" ) and l [af ] is defined and not 'vrf' in l %}
23- network {{ l[af] |ansible.utils.ipaddr(0) }}
24- {% endfor %}
25- !
26- {% for pfx in bgp .originate |default ([]) if af == 'ipv4' %}
27- network {{ pfx|ansible.utils.ipaddr('0') }}
18+ {% for pfx in bgp .advertise |default ([]) if af in pfx %}
19+ network {{ pfx[af] }}
2820{% endfor %}
2921{% endfor %}
3022!
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ router bgp {{ bgp.as }}
1515{% if af == 'ipv4' and 'ospf' in vdata %}
1616 redistribute ospf {{ vdata.vrfidx }} route-map all
1717{% endif %}
18- {% for n in vdata .networks |default ([]) if af in n %}
19- network {{ n [af] |ansible.utils.ipaddr('0') }}
18+ {% for pfx in vdata .bgp . advertise |default ([]) if af in pfx %}
19+ network {{ pfx [af] }}
2020{% endfor %}
2121!
2222{% for n in vdata .bgp .neighbors |default ([]) if af in n %}
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ features:
3939 generate_mac : [ ethernet ]
4040 bfd : true
4141 bgp :
42+ advertise : true
4243 allowas_in : true
4344 as_override : true
4445 default_originate : true
You can’t perform that action at this time.
0 commit comments