---
- name: Stop containerd
  include_tasks: uninstall_containerd.yaml
  when: .cri.container_manager | eq "containerd"

- name: Stop docker
  include_tasks: uninstall_docker.yaml
  when: .cri.container_manager | eq "docker"

# install cridockerd
- include_tasks: uninstall_cridockerd.yaml
  when:
  - .cri.container_manager | eq  "docker"
  - .cridockerd_version | empty | not

- name: Delete cri residue files
  command: |
   rm -f /usr/local/bin/crictl