role network-routing: use flush to delete routes
- del will fail if gateways change
This commit is contained in:
parent
21c6f63b5f
commit
32f6654e44
1 changed files with 2 additions and 4 deletions
|
@ -67,8 +67,6 @@
|
||||||
/sbin/ip -6 route del blackhole ::/0 table main
|
/sbin/ip -6 route del blackhole ::/0 table main
|
||||||
{% else %}
|
{% else %}
|
||||||
# static routes for icvpn
|
# static routes for icvpn
|
||||||
/sbin/ip -4 route del {{ icvpn_ipv4_transfer_net }}{% for host in groups['ffmwu-gateways'] %} nexthop via {{ bgp_ipv4_transfer_net | ipaddr('net') | ipaddr(hostvars[host]['magic']) | ipaddr('ip') }}{% endfor %}
|
/sbin/ip -4 route flush exact {{ icvpn_ipv4_transfer_net }}
|
||||||
|
/sbin/ip -6 route flush exact {{ icvpn_ipv6_transfer_net }}
|
||||||
/sbin/ip -6 route del {{ icvpn_ipv6_transfer_net }}{% for host in groups['ffmwu-gateways'] %} nexthop via {{ bgp_ipv6_transfer_net | ipaddr('net') | ipsubnet(64, 0) | ipaddr(hostvars[host]['magic']) | ipaddr('ip') }}{% endfor %}
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue