2016-01-30 15:04:47 +00:00
|
|
|
---
|
2019-04-19 13:01:54 +00:00
|
|
|
- name: reset_calico_cni
|
2016-01-30 15:04:47 +00:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2019-04-19 13:01:54 +00:00
|
|
|
- delete 10-calico.conflist
|
2019-07-16 15:35:24 +00:00
|
|
|
- docker | delete calico-node containers
|
|
|
|
- containerd | delete calico-node containers
|
2016-01-30 15:04:47 +00:00
|
|
|
|
2019-04-19 13:01:54 +00:00
|
|
|
- name: delete 10-calico.conflist
|
|
|
|
file:
|
2019-07-16 15:35:24 +00:00
|
|
|
path: /etc/cni/net.d/10-calico.conflist
|
2019-04-19 13:01:54 +00:00
|
|
|
state: absent
|
2016-01-30 15:04:47 +00:00
|
|
|
|
2019-07-16 15:35:24 +00:00
|
|
|
- name: docker | delete calico-node containers
|
2019-04-19 13:01:54 +00:00
|
|
|
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
|
2019-07-16 15:35:24 +00: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"]
|
2019-10-02 11:37:07 +00:00
|
|
|
|
|
|
|
- name: Calico | Reload NetworkManager
|
|
|
|
service:
|
|
|
|
name: NetworkManager
|
|
|
|
state: reloaded
|
|
|
|
when: '"running" in nm_check.stdout'
|