2020-03-04 10:11:47 +00:00
|
|
|
---
|
|
|
|
- name: reset_kube_router
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2021-01-18 09:41:44 +00:00
|
|
|
- Kube-router | delete kube-router docker containers
|
|
|
|
- Kube-router | delete kube-router crio/containerd containers
|
2020-03-04 10:11:47 +00:00
|
|
|
|
2021-01-18 09:41:44 +00:00
|
|
|
- name: Kube-router | delete kube-router docker containers
|
2020-11-28 16:30:47 +00:00
|
|
|
shell: "{{ docker_bin_dir }}/docker ps -af name=k8s_POD_kube-router* -q | xargs --no-run-if-empty docker rm -f"
|
2020-03-04 10:11:47 +00:00
|
|
|
register: docker_kube_router_remove
|
|
|
|
until: docker_kube_router_remove is succeeded
|
|
|
|
retries: 5
|
|
|
|
when: container_manager in ["docker"]
|
|
|
|
|
2021-01-18 09:41:44 +00:00
|
|
|
- name: Kube-router | delete kube-router crio/containerd containers
|
2020-11-28 16:30:47 +00:00
|
|
|
shell: '{{ bin_dir }}/crictl pods --name kube-router* -q | xargs -I% --no-run-if-empty bash -c "{{ bin_dir }}/crictl stopp % && {{ bin_dir }}/crictl rmp %"'
|
2020-03-04 10:11:47 +00:00
|
|
|
register: crictl_kube_router_remove
|
|
|
|
until: crictl_kube_router_remove is succeeded
|
|
|
|
retries: 5
|
|
|
|
when: container_manager in ["crio", "containerd"]
|