---
- name: Containerd | Uninstall the containerd system service
  ignore_errors: true
  command: |
    systemctl stop containerd.service
    systemctl disable containerd.service
    rm -rf /etc/systemd/system/containerd.service*
    systemctl daemon-reload
    systemctl reset-failed containerd.service

- name: Containerd | Remove all containerd-related files and binaries
  command: |
    rm -rf {{ .cri.containerd.data_root }}
    rm -rf /etc/containerd
    rm -rf /usr/local/bin/containerd*
    rm -f /usr/local/bin/runc
    rm -f /usr/local/bin/ctr
