mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-16 08:27:31 -02:30
Allow containerd runtime with fedora os (30/31) - add CI test (#6094)
This commit is contained in:
@@ -49,6 +49,12 @@ containerd_debian_repo_gpgkey: 'https://download.docker.com/linux/debian/gpg'
|
||||
containerd_debian_repo_repokey: '9DC858229FC7DD38854AE2D88D81803C0EBFCD88'
|
||||
containerd_debian_repo_component: 'stable'
|
||||
|
||||
# Fedora docker-ce repo
|
||||
containerd_fedora_repo_base_url: 'https://download.docker.com/linux/fedora/$releasever/$basearch/stable'
|
||||
containerd_fedora_repo_gpgkey: 'https://download.docker.com/linux/fedora/gpg'
|
||||
containerd_fedora_repo_repokey: '9DC858229FC7DD38854AE2D88D81803C0EBFCD88'
|
||||
containerd_fedora_repo_component: 'stable'
|
||||
|
||||
containerd_default_runtime:
|
||||
type: io.containerd.runtime.v1.linux
|
||||
engine: ''
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
fail:
|
||||
msg: "{{ ansible_distribution }} is not supported by containerd."
|
||||
when:
|
||||
- not ansible_distribution in ["CentOS","RedHat", "Ubuntu", "Debian"]
|
||||
- not ansible_distribution in ["CentOS","RedHat", "Ubuntu", "Debian", "Fedora"]
|
||||
|
||||
- name: gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
@@ -34,6 +34,21 @@
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: disable unified_cgroup_hierarchy in Fedora 31+
|
||||
shell:
|
||||
cmd: grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
|
||||
when:
|
||||
- ansible_distribution == "Fedora"
|
||||
- (ansible_distribution_major_version | int) >= 31
|
||||
- ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] is not defined or ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] != '0'
|
||||
|
||||
- name: reboot in Fedora 31+
|
||||
reboot:
|
||||
when:
|
||||
- ansible_distribution == "Fedora"
|
||||
- (ansible_distribution_major_version | int) >= 31
|
||||
- ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] is not defined or ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] != '0'
|
||||
|
||||
- include_tasks: containerd_repo.yml
|
||||
when: not is_ostree
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[docker-ce]
|
||||
name=Docker-CE Repository
|
||||
baseurl={{ containerd_fedora_repo_base_url }}
|
||||
enabled=1
|
||||
gpgcheck={{ '1' if containerd_fedora_repo_gpgkey else '0' }}
|
||||
gpgkey={{ containerd_fedora_repo_gpgkey }}
|
||||
{% if http_proxy is defined %}proxy={{ http_proxy }}{% endif %}
|
||||
16
roles/container-engine/containerd/vars/fedora.yml
Normal file
16
roles/container-engine/containerd/vars/fedora.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
|
||||
containerd_versioned_pkg:
|
||||
'latest': "{{ containerd_package }}"
|
||||
'1.2.10': "{{ containerd_package }}-1.2.10-3.2.fc{{ ansible_distribution_major_version }}"
|
||||
'1.2.12': "{{ containerd_package }}-1.2.12-3.2.fc{{ ansible_distribution_major_version }}"
|
||||
'1.2.13': "{{ containerd_package }}-1.2.13-3.1.fc{{ ansible_distribution_major_version }}"
|
||||
'stable': "{{ containerd_package }}-1.2.13-3.1.fc{{ ansible_distribution_major_version }}"
|
||||
'edge': "{{ containerd_package }}-1.2.13-3.1.fc{{ ansible_distribution_major_version }}"
|
||||
|
||||
containerd_package_info:
|
||||
pkg_mgr: dnf
|
||||
pkgs:
|
||||
- name: "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
|
||||
runc_binary: /usr/bin/runc
|
||||
Reference in New Issue
Block a user