r/{cri-o,kubelet}: Support versioned packages
Fedora 41 introduced versioned package names for Kubernetes components, including CRI-O. The intent is to allow multiple versions of Kubernetes to be available (but not necessarily installed) within a given Fedora release. In order to use these packages, we need to set the desired Kubernetes version, via the new `kubernetes_version` Ansible variable.
This commit is contained in:
@@ -1,8 +1,29 @@
|
||||
- name: load os-specific values
|
||||
include_vars: '{{ item }}'
|
||||
with_first_found:
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml'
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml'
|
||||
- '{{ ansible_distribution }}.yml'
|
||||
- '{{ ansible_os_family }}.yml'
|
||||
- defaults.yml
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: ensure legacy cri-o package is not installed
|
||||
package:
|
||||
name: cri-o
|
||||
state: absent
|
||||
when: crio_package != 'cri-o'
|
||||
tags:
|
||||
- install
|
||||
- cleanup
|
||||
|
||||
- name: ensure cri-o is installed
|
||||
package:
|
||||
name:
|
||||
- container-selinux
|
||||
- cri-o
|
||||
- '{{ crio_package }}'
|
||||
- crun
|
||||
state: present
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user