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:
spaced
2020-03-17 11:12:21 +01:00
committed by GitHub
parent 974902af31
commit 876d4de6be
17 changed files with 222 additions and 48 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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