@ -1,31 +1,4 @@
---
- name : Fail containerd setup if distribution is not supported
fail:
msg : "{{ ansible_distribution }} is not supported by containerd."
when:
- not (allow_unsupported_distribution_setup | default(false)) and (ansible_distribution not in containerd_supported_distributions)
- name : Containerd | Remove any package manager controlled containerd package
package:
name : "{{ containerd_package }}"
state : absent
when:
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
- name : Containerd | Remove containerd repository
file:
path : "{{ yum_repo_dir }}/containerd.repo"
state : absent
when:
- ansible_os_family in ['RedHat']
- name : Containerd | Remove containerd repository
apt_repository:
repo : "{{ item }}"
state : absent
with_items : "{{ containerd_repo_info.repos }}"
when : ansible_pkg_mgr == 'apt'
- name : Containerd | Download containerd
include_tasks : "../../../download/tasks/download_file.yml"
vars:
@ -41,21 +14,6 @@
- --strip-components=1
notify : Restart containerd
- name : Containerd | Remove orphaned binary
file:
path : "/usr/bin/{{ item }}"
state : absent
when:
- containerd_bin_dir != "/usr/bin"
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
ignore_errors : true # noqa ignore-errors
with_items:
- containerd
- containerd-shim
- containerd-shim-runc-v1
- containerd-shim-runc-v2
- ctr
- name : Containerd | Generate systemd service for containerd
template:
src : containerd.service.j2