mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-28 14:25:09 -02:30
Fedora CoreOS support (#5657)
* fedora coreos support - bootstrap and new fact for * fedora coreos support - fix bootstrap condition * fedora coreos support - allow customize packages for fedora coreos bootstrap * fedora coreos support - prevent install ptyhon3 and epel via dnf for fedora coreos * fedora coreos support - handle all ostree like os in same way * fedora coreos support - handle all ostree like os in same way for crio * fedora coreos support - add fcos documentations
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
dependencies:
|
||||
- role: adduser
|
||||
user: "{{ addusers.kube }}"
|
||||
when: not is_atomic
|
||||
when:
|
||||
- not is_atomic
|
||||
- not is_fedora_coreos
|
||||
tags:
|
||||
- kubelet
|
||||
- kubelet
|
||||
|
||||
@@ -27,9 +27,21 @@
|
||||
path: /run/ostree-booted
|
||||
register: ostree
|
||||
|
||||
- name: set is_fedora_coreos
|
||||
lineinfile:
|
||||
path: /etc/os-release
|
||||
line: "VARIANT_ID=coreos"
|
||||
state: present
|
||||
check_mode: yes
|
||||
register: os_variant_coreos
|
||||
|
||||
- name: set is_fedora_coreos
|
||||
set_fact:
|
||||
is_fedora_coreos: "{{ ostree.stat.exists and os_variant_coreos is not changed }}"
|
||||
|
||||
- name: set is_atomic
|
||||
set_fact:
|
||||
is_atomic: "{{ ostree.stat.exists }}"
|
||||
is_atomic: "{{ ostree.stat.exists and not is_fedora_coreos }}"
|
||||
|
||||
- name: set kube_cert_group on atomic hosts
|
||||
set_fact:
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
when:
|
||||
- ansible_distribution in ["CentOS","RedHat","OracleLinux"]
|
||||
- not is_atomic
|
||||
- not is_fedora_coreos
|
||||
|
||||
- name: Install python-dnf for latest RedHat versions
|
||||
command: dnf install -y python-dnf yum
|
||||
@@ -36,6 +37,7 @@
|
||||
- ansible_distribution_major_version|int > 21
|
||||
- ansible_distribution_major_version|int <= 29
|
||||
- not is_atomic
|
||||
- not is_fedora_coreos
|
||||
changed_when: False
|
||||
tags:
|
||||
- bootstrap-os
|
||||
@@ -50,6 +52,7 @@
|
||||
- ansible_distribution == "Fedora"
|
||||
- ansible_distribution_major_version|int >= 30
|
||||
- not is_atomic
|
||||
- not is_fedora_coreos
|
||||
changed_when: False
|
||||
tags:
|
||||
- bootstrap-os
|
||||
@@ -61,6 +64,7 @@
|
||||
when:
|
||||
- ansible_distribution in ["CentOS","RedHat"]
|
||||
- not is_atomic
|
||||
- not is_fedora_coreos
|
||||
- epel_enabled|bool
|
||||
tags:
|
||||
- bootstrap-os
|
||||
@@ -79,7 +83,7 @@
|
||||
until: pkgs_task_result is succeeded
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic)
|
||||
when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic or is_fedora_coreos)
|
||||
tags:
|
||||
- bootstrap-os
|
||||
|
||||
|
||||
Reference in New Issue
Block a user