2016-01-30 23:04:47 +08:00
|
|
|
---
|
2019-04-19 21:01:54 +08:00
|
|
|
- name: reset_calico_cni
|
2016-01-30 23:04:47 +08:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2019-04-19 21:01:54 +08:00
|
|
|
- delete 10-calico.conflist
|
2019-07-16 23:35:24 +08:00
|
|
|
- docker | delete calico-node containers
|
|
|
|
- containerd | delete calico-node containers
|
2016-01-30 23:04:47 +08:00
|
|
|
|
2019-04-19 21:01:54 +08:00
|
|
|
- name: delete 10-calico.conflist
|
|
|
|
file:
|
2019-07-16 23:35:24 +08:00
|
|
|
path: /etc/cni/net.d/10-calico.conflist
|
2019-04-19 21:01:54 +08:00
|
|
|
state: absent
|
2016-01-30 23:04:47 +08:00
|
|
|
|
2019-07-16 23:35:24 +08:00
|
|
|
- name: docker | delete calico-node containers
|
2019-04-19 21:01:54 +08:00
|
|
|
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
|
2019-07-16 23:35:24 +08:00
|
|
|
when: container_manager in ["docker"]
|
|
|
|
|
|
|
|
- name: containerd | delete calico-node containers
|
|
|
|
shell: 'crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"'
|
|
|
|
when: container_manager in ["crio", "containerd"]
|