2018-12-05 03:37:45 +08:00
|
|
|
---
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Reset | check vxlan.calico network device
|
2022-07-20 04:15:27 +08:00
|
|
|
stat:
|
|
|
|
path: /sys/class/net/vxlan.calico
|
|
|
|
get_attributes: no
|
|
|
|
get_checksum: no
|
|
|
|
get_mime: no
|
|
|
|
register: vxlan
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Reset | remove the network vxlan.calico device created by calico
|
2022-07-20 04:15:27 +08:00
|
|
|
command: ip link del vxlan.calico
|
|
|
|
when: vxlan.stat.exists
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Reset | check dummy0 network device
|
2018-12-05 03:37:45 +08:00
|
|
|
stat:
|
|
|
|
path: /sys/class/net/dummy0
|
2021-02-10 21:36:59 +08:00
|
|
|
get_attributes: no
|
|
|
|
get_checksum: no
|
|
|
|
get_mime: no
|
2018-12-05 03:37:45 +08:00
|
|
|
register: dummy0
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Reset | remove the network device created by calico
|
2018-12-05 03:37:45 +08:00
|
|
|
command: ip link del dummy0
|
|
|
|
when: dummy0.stat.exists
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Reset | get and remove remaining routes set by bird
|
2022-01-11 16:45:16 +08:00
|
|
|
shell: set -o pipefail && ip route show proto bird | xargs -i bash -c "ip route del {} proto bird "
|
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
2020-07-28 23:39:47 +08:00
|
|
|
changed_when: false
|