mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 16:28:45 -03:30
Initial AlmaLinux support (#7538)
* AlmaLinux: ansible>2.9.19 is needed to know about AlmaLinux * AlmaLinux: identify as a centos derrivative * AlmaLinux: add AlmaLinux to checks for CentOS * Use ansible_os_family to compare family and not distribution
This commit is contained in:
@@ -35,7 +35,7 @@ Variables are listed with their default values, if applicable.
|
||||
* `coreos_locksmithd_disable: false`
|
||||
Whether `locksmithd` (responsible for rolling restarts) should be disabled or be left alone.
|
||||
|
||||
#### CentOS/RHEL
|
||||
#### CentOS/RHEL/AlmaLinux
|
||||
|
||||
* `centos_fastestmirror_enabled: false`
|
||||
Whether the [fastestmirror](https://wiki.centos.org/PackageManagement/Yum/FastestMirror) yum plugin should be enabled.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
## CentOS/RHEL specific variables
|
||||
## CentOS/RHEL/AlmaLinux specific variables
|
||||
# Use the fastestmirror yum plugin
|
||||
centos_fastestmirror_enabled: false
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
check_mode: false
|
||||
|
||||
- include_tasks: bootstrap-centos.yml
|
||||
when: '''ID="centos"'' in os_release.stdout_lines or ''ID="ol"'' in os_release.stdout_lines'
|
||||
when: '''ID="centos"'' in os_release.stdout_lines or ''ID="ol"'' in os_release.stdout_lines or ''ID="almalinux"'' in os_release.stdout_lines'
|
||||
|
||||
- include_tasks: bootstrap-redhat.yml
|
||||
when: '''ID="rhel"'' in os_release.stdout_lines'
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
dest: "{{ yum_repo_dir }}/containerd.repo"
|
||||
when: ansible_distribution == "Fedora"
|
||||
|
||||
- name: Configure containerd repository on RedHat/OracleLinux/CentOS
|
||||
- name: Configure containerd repository on RedHat/OracleLinux/CentOS/AlmaLinux
|
||||
template:
|
||||
src: "rh_containerd.repo.j2"
|
||||
dest: "{{ yum_repo_dir }}/containerd.repo"
|
||||
when: ansible_distribution in ["CentOS", "OracleLinux", "RedHat"]
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- ansible_distribution != "Fedora"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
fail:
|
||||
msg: "{{ ansible_distribution }} is not supported by containerd."
|
||||
when:
|
||||
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora"]
|
||||
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux"]
|
||||
|
||||
- name: gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
|
||||
@@ -82,11 +82,14 @@
|
||||
dest: "{{ yum_repo_dir }}/docker.repo"
|
||||
when: ansible_distribution == "Fedora" and not is_ostree
|
||||
|
||||
- name: Configure docker repository on RedHat/CentOS/Oracle Linux
|
||||
- name: Configure docker repository on RedHat/CentOS/Oracle/AlmaLinux Linux
|
||||
template:
|
||||
src: "rh_docker.repo.j2"
|
||||
dest: "{{ yum_repo_dir }}/docker-ce.repo"
|
||||
when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_ostree
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- ansible_distribution != "Fedora"
|
||||
- not is_ostree
|
||||
|
||||
- name: Remove dpkg hold
|
||||
dpkg_selections:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
path: "{{ yum_repo_dir }}/docker.repo"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_distribution in ["CentOS","RedHat","OracleLinux"]
|
||||
- ansible_os_family == 'RedHat'
|
||||
- not is_ostree
|
||||
|
||||
- name: Ensure old versions of Docker are not installed. | Debian
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
- name: Stop if unknown OS
|
||||
assert:
|
||||
that: ansible_os_family in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar Container Linux by Kinvolk', 'Suse', 'ClearLinux', 'OracleLinux']
|
||||
msg: "{{ ansible_os_family }} is not a known OS"
|
||||
that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar Container Linux by Kinvolk', 'Suse', 'ClearLinux', 'OracleLinux', 'AlmaLinux']
|
||||
msg: "{{ ansible_distribution }} is not a known OS"
|
||||
when: not ignore_assert_errors
|
||||
|
||||
- name: Stop if unknown network plugin
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
path: "{{ yum_repo_dir }}/docker.repo"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_distribution in ["CentOS","RedHat","OracleLinux"]
|
||||
- ansible_os_family == "RedHat"
|
||||
- not is_fedora_coreos
|
||||
|
||||
- name: Install python3-dnf for latest RedHat versions
|
||||
@@ -39,12 +39,12 @@
|
||||
tags:
|
||||
- bootstrap-os
|
||||
|
||||
- name: Install epel-release on RedHat/CentOS
|
||||
- name: Install epel-release on RHEL derivatives
|
||||
package:
|
||||
name: epel-release
|
||||
state: present
|
||||
when:
|
||||
- ansible_distribution in ["CentOS","RedHat"]
|
||||
- ansible_os_family == "RedHat"
|
||||
- not is_fedora_coreos
|
||||
- epel_enabled|bool
|
||||
tags:
|
||||
|
||||
@@ -109,6 +109,6 @@
|
||||
when:
|
||||
- not dns_late
|
||||
- azure_check.stat.exists
|
||||
- ansible_distribution in ["CentOS","RedHat","OracleLinux"]
|
||||
- ansible_os_family == "RedHat"
|
||||
tags:
|
||||
- bootstrap-os
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
mode: "0755"
|
||||
with_fileglob:
|
||||
- files/*
|
||||
when: ansible_os_family in ["CentOS","RedHat"]
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Macvlan | Install post-up script on centos
|
||||
copy:
|
||||
@@ -44,7 +44,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: ansible_os_family in ["CentOS","RedHat"] and enable_nat_default_gateway
|
||||
when: ansible_os_family == "RedHat" and enable_nat_default_gateway
|
||||
|
||||
- name: Macvlan | Install network gateway interface on centos
|
||||
template:
|
||||
@@ -55,7 +55,7 @@
|
||||
- {src: centos-routes-macvlan.cfg, dst: route-mac0 }
|
||||
- {src: centos-postup-macvlan.cfg, dst: post-up-mac0 }
|
||||
notify: Macvlan | restart network
|
||||
when: ansible_os_family in ["CentOS","RedHat"]
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Macvlan | Install service nat via gateway on Flatcar Container Linux
|
||||
template:
|
||||
|
||||
Reference in New Issue
Block a user