2018-12-04 19:37:45 +00:00
|
|
|
---
|
|
|
|
- name: reset | check dummy0 network device
|
|
|
|
stat:
|
|
|
|
path: /sys/class/net/dummy0
|
|
|
|
register: dummy0
|
|
|
|
|
|
|
|
- name: reset | remove the network device created by calico
|
|
|
|
command: ip link del dummy0
|
|
|
|
when: dummy0.stat.exists
|
|
|
|
|
2020-07-28 15:39:47 +00:00
|
|
|
- name: reset | get remaining routes set by bird
|
2018-12-04 19:37:45 +00:00
|
|
|
command: ip route show proto bird
|
2020-07-28 15:39:47 +00:00
|
|
|
changed_when: false
|
2018-12-04 19:37:45 +00:00
|
|
|
register: bird_routes
|
|
|
|
|
2020-07-27 13:24:17 +00:00
|
|
|
- name: reset | remove remaining routes set by bird # noqa 301
|
2018-12-04 19:37:45 +00:00
|
|
|
command: "ip route del {{ bird_route }} proto bird"
|
|
|
|
with_items: "{{ bird_routes.stdout_lines }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: bird_route
|