mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 22:16:23 -02:30
feat: add openSUSE MicroOS support (#13449)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
This commit is contained in:
@@ -36,6 +36,16 @@
|
||||
tags:
|
||||
- system-packages
|
||||
|
||||
- name: Reboot openSUSE MicroOS after transactional package changes
|
||||
ansible.builtin.reboot: {}
|
||||
throttle: 1
|
||||
when:
|
||||
- ansible_facts['distribution'] == "openSUSE MicroOS"
|
||||
- pkgs_task_result is defined
|
||||
- pkgs_task_result is changed
|
||||
tags:
|
||||
- system-packages
|
||||
|
||||
- name: Create remote_tmp for it is used by another module
|
||||
file:
|
||||
path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: Import openSUSE bootstrap
|
||||
import_tasks: opensuse.yml
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
# OpenSUSE ships with Python installed
|
||||
- name: Gather host facts to get ansible_distribution_version ansible_distribution_major_version
|
||||
- name: Gather host distribution facts
|
||||
setup:
|
||||
gather_subset: '!all'
|
||||
filter: ansible_distribution_*version
|
||||
filter: ansible_distribution*
|
||||
|
||||
- name: Check that /etc/sysconfig/proxy file exists
|
||||
stat:
|
||||
|
||||
@@ -118,6 +118,7 @@ containerd_supported_distributions:
|
||||
- "Flatcar"
|
||||
- "Suse"
|
||||
- "openSUSE Leap"
|
||||
- "openSUSE MicroOS"
|
||||
- "openSUSE Tumbleweed"
|
||||
- "Kylin Linux Advanced Server"
|
||||
- "UnionTech"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
when:
|
||||
- not is_ostree
|
||||
- ansible_facts['distribution'] != "Flatcar"
|
||||
- ansible_facts['distribution'] != "openSUSE MicroOS"
|
||||
block:
|
||||
- name: Runc | Remove package
|
||||
package:
|
||||
|
||||
@@ -89,6 +89,7 @@ supported_os_distributions:
|
||||
- 'Flatcar'
|
||||
- 'Suse'
|
||||
- 'openSUSE Leap'
|
||||
- 'openSUSE MicroOS'
|
||||
- 'openSUSE Tumbleweed'
|
||||
- 'ClearLinux'
|
||||
- 'OracleLinux'
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: Normalize ansible_facts for openSUSE MicroOS
|
||||
set_fact:
|
||||
ansible_facts: "{{ ansible_facts | combine({'os_family': 'Suse'}) }}"
|
||||
ansible_os_family: Suse
|
||||
when: ansible_facts['distribution'] == "openSUSE MicroOS"
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: Check resolvconf
|
||||
command: which resolvconf
|
||||
register: resolvconf
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
msg: "{{ ansible_facts['distribution'] }} is not a known OS"
|
||||
when: not ignore_assert_errors
|
||||
|
||||
- name: Stop if the container manager is unsupported on openSUSE MicroOS
|
||||
assert:
|
||||
that: container_manager == "containerd"
|
||||
msg: "openSUSE MicroOS only supports containerd"
|
||||
when:
|
||||
- not ignore_assert_errors
|
||||
- ansible_facts['distribution'] == "openSUSE MicroOS"
|
||||
|
||||
- name: Stop if memory is too small for control plane nodes
|
||||
assert:
|
||||
that: ansible_facts['memtotal_mb'] >= minimal_master_memory_mb
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
- distribution
|
||||
- pkg_mgr
|
||||
|
||||
- name: Normalize openSUSE MicroOS legacy OS family fact
|
||||
set_fact:
|
||||
ansible_os_family: Suse
|
||||
when: ansible_facts['distribution'] == "openSUSE MicroOS"
|
||||
|
||||
- name: Update package management cache (zypper) - SUSE
|
||||
command: zypper -n --gpg-auto-import-keys ref
|
||||
register: make_cache_output
|
||||
|
||||
Reference in New Issue
Block a user