fb591bf232
Change-Id: I5cb2bdf1a57707c1b8da3e5ac0c80e5c353480a4
26 lines
829 B
YAML
26 lines
829 B
YAML
---
|
|
- name: reset_calico_cni
|
|
command: /bin/true
|
|
notify:
|
|
- delete 10-calico.conflist
|
|
- docker | delete calico-node containers
|
|
- containerd | delete calico-node containers
|
|
|
|
- name: delete 10-calico.conflist
|
|
file:
|
|
path: /etc/cni/net.d/10-calico.conflist
|
|
state: absent
|
|
|
|
- name: docker | delete calico-node containers
|
|
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
|
|
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"]
|
|
|
|
- name: Calico | Reload NetworkManager
|
|
service:
|
|
name: NetworkManager
|
|
state: reloaded
|
|
when: '"running" in nm_check.stdout'
|