---
- name: Stop docker service
  ignore_errors: true
  command: |
    systemctl stop docker.service
    systemctl disable docker.service
    rm -rf /etc/systemd/system/docker.service*
    systemctl daemon-reload
    systemctl reset-failed docker.service

- name: Uninstall containerd
  include_tasks: uninstall_containerd.yaml

- name: Delete docker residue files
  command: |
    rm -rf {{ .cri.docker.data_root }}
    rm -rf /etc/docker
    rm -rf /usr/local/bin/docker*

- name: Uninstall docker interface
  ignore_errors: true
  command: ip link delete docker0