You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
755 B

  1. ---
  2. - name: reset_kube_router
  3. command: /bin/true
  4. notify:
  5. - docker | delete kube-router containers
  6. - containerd | delete kube-router containers
  7. - name: docker | delete kube-router containers
  8. shell: "docker ps -af name=k8s_POD_kube-router* -q | xargs --no-run-if-empty docker rm -f"
  9. register: docker_kube_router_remove
  10. until: docker_kube_router_remove is succeeded
  11. retries: 5
  12. when: container_manager in ["docker"]
  13. - name: containerd | delete kube-router containers
  14. shell: 'crictl pods --name kube-router* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"'
  15. register: crictl_kube_router_remove
  16. until: crictl_kube_router_remove is succeeded
  17. retries: 5
  18. when: container_manager in ["crio", "containerd"]