c12s-kubespray/roles/network_plugin/calico/tasks/reset.yml
2018-12-04 11:37:45 -08:00

19 lines
530 B
YAML

---
- 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
- name: reset | get remaining routes set by bird
command: ip route show proto bird
register: bird_routes
- name: reset | remove remaining routes set by bird
command: "ip route del {{ bird_route }} proto bird"
with_items: "{{ bird_routes.stdout_lines }}"
loop_control:
loop_var: bird_route