mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Remove support for CoreOS Container Linux (#6576)
This commit is contained in:
40
roles/bootstrap-os/tasks/bootstrap-flatcar.yml
Normal file
40
roles/bootstrap-os/tasks/bootstrap-flatcar.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
# Flatcar Container Linux ships without Python installed
|
||||
|
||||
- name: Check if bootstrap is needed
|
||||
raw: stat /opt/bin/.bootstrapped
|
||||
register: need_bootstrap
|
||||
environment: {}
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
||||
set_fact:
|
||||
bin_dir: "/opt/bin"
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: Run bootstrap.sh
|
||||
script: bootstrap.sh
|
||||
become: true
|
||||
environment:
|
||||
http_proxy: "{{ http_proxy | default('') }}"
|
||||
https_proxy: "{{ https_proxy | default('') }}"
|
||||
when:
|
||||
- need_bootstrap.rc != 0
|
||||
|
||||
- name: Set the ansible_python_interpreter fact
|
||||
set_fact:
|
||||
ansible_python_interpreter: "{{ bin_dir }}/python"
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: Disable auto-upgrade
|
||||
systemd:
|
||||
name: locksmithd.service
|
||||
masked: true
|
||||
state: stopped
|
||||
when:
|
||||
- coreos_locksmithd_disable
|
||||
@@ -16,9 +16,9 @@
|
||||
- include_tasks: bootstrap-fedora-coreos.yml
|
||||
when: '"ID=fedora" in os_release.stdout and "VARIANT_ID=coreos" in os_release.stdout'
|
||||
|
||||
- include_tasks: bootstrap-coreos.yml
|
||||
- include_tasks: bootstrap-flatcar.yml
|
||||
when:
|
||||
- '"CoreOS" in os_release.stdout or "Flatcar" in os_release.stdout'
|
||||
- '"Flatcar" in os_release.stdout'
|
||||
- '"ID=fedora" not in os_release.stdout'
|
||||
|
||||
- include_tasks: bootstrap-debian.yml
|
||||
@@ -50,17 +50,17 @@
|
||||
name: "{{ inventory_hostname }}"
|
||||
when:
|
||||
- override_system_hostname
|
||||
- ansible_os_family not in ['Suse', 'Container Linux by CoreOS', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] and not is_fedora_coreos
|
||||
- ansible_os_family not in ['Suse', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] and not is_fedora_coreos
|
||||
|
||||
# (2/3)
|
||||
- name: Assign inventory name to unconfigured hostnames (CoreOS, non-Flatcar, Suse and ClearLinux only)
|
||||
- name: Assign inventory name to unconfigured hostnames (CoreOS, Flatcar, Suse and ClearLinux only)
|
||||
command: "hostnamectl set-hostname {{ inventory_hostname }}"
|
||||
register: hostname_changed
|
||||
become: true
|
||||
changed_when: false
|
||||
when:
|
||||
- override_system_hostname
|
||||
- ansible_os_family in ['Suse', 'Container Linux by CoreOS', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
||||
- ansible_os_family in ['Suse', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
||||
|
||||
# (3/3)
|
||||
- name: Update hostname fact (CoreOS, Flatcar, Suse and ClearLinux only)
|
||||
@@ -69,7 +69,7 @@
|
||||
filter: ansible_hostname
|
||||
when:
|
||||
- override_system_hostname
|
||||
- ansible_os_family in ['Suse', 'Flatcar Container Linux by Kinvolk', 'Container Linux by CoreOS', 'ClearLinux'] or is_fedora_coreos
|
||||
- ansible_os_family in ['Suse', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
||||
|
||||
- name: "Install ceph-commmon package"
|
||||
package:
|
||||
|
||||
Reference in New Issue
Block a user