mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Stop cleaning up containerd packages (#12213)
The switch to not use system packages for containerd packages happened multiples releases ago ; there should not be any up-to-date installation of kubespray needing that cleanup. Remove those steps and variables only used by them.
This commit is contained in:
@@ -3,15 +3,3 @@
|
||||
# manager controlled installs to direct download ones.
|
||||
containerd_package: 'containerd.io'
|
||||
yum_repo_dir: /etc/yum.repos.d
|
||||
|
||||
# Keep minimal repo information around for cleanup
|
||||
containerd_repo_info:
|
||||
repos:
|
||||
|
||||
# Ubuntu docker-ce repo
|
||||
containerd_ubuntu_repo_base_url: "https://download.docker.com/linux/ubuntu"
|
||||
containerd_ubuntu_repo_component: "stable"
|
||||
|
||||
# Debian docker-ce repo
|
||||
containerd_debian_repo_base_url: "https://download.docker.com/linux/debian"
|
||||
containerd_debian_repo_component: "stable"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,22 +1,4 @@
|
||||
---
|
||||
- name: Containerd | Remove containerd repository for RedHat os family
|
||||
file:
|
||||
path: "{{ yum_repo_dir }}/containerd.repo"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_os_family in ['RedHat']
|
||||
tags:
|
||||
- reset_containerd
|
||||
|
||||
- name: Containerd | Remove containerd repository for Debian os family
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: absent
|
||||
with_items: "{{ containerd_repo_info.repos }}"
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
tags:
|
||||
- reset_containerd
|
||||
|
||||
- name: Containerd | Stop containerd service
|
||||
service:
|
||||
name: containerd
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
containerd_repo_info:
|
||||
repos:
|
||||
- >
|
||||
deb {{ containerd_debian_repo_base_url }}
|
||||
{{ ansible_distribution_release | lower }}
|
||||
{{ containerd_debian_repo_component }}
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
containerd_repo_info:
|
||||
repos:
|
||||
- >
|
||||
deb {{ containerd_ubuntu_repo_base_url }}
|
||||
{{ ansible_distribution_release | lower }}
|
||||
{{ containerd_ubuntu_repo_component }}
|
||||
Reference in New Issue
Block a user