mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Support Fedora Rawhide
Fedora rawhide has neither yum, nor python2, nor python2 libselinux bindings. Ansible needs all of these. This adds a new play which can be used to get machines setup so they can then be managed with ansible.
This commit is contained in:
parent
7996f39413
commit
fc5c063a2d
@ -1,4 +1,12 @@
|
||||
---
|
||||
- hosts: all
|
||||
gather_facts: false
|
||||
sudo: yes
|
||||
roles:
|
||||
- pre-ansible
|
||||
tags:
|
||||
- pre-ansible
|
||||
|
||||
# Install etcd
|
||||
- hosts: etcd
|
||||
sudo: yes
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
# collect information about what packages are installed
|
||||
- include: rpm.yml
|
||||
when: ansible_pkg_mgr == "yum"
|
||||
when: ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "dnf"
|
||||
|
||||
- include: centos.yml
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
8
contrib/ansible/roles/pre-ansible/tasks/fedora-dnf.yml
Normal file
8
contrib/ansible/roles/pre-ansible/tasks/fedora-dnf.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Install minimal packages
|
||||
raw: dnf install -y {{ item }}
|
||||
with_items:
|
||||
- python # everyone need python2
|
||||
- python-dnf # some versions of ansible (2.0) use dnf directly
|
||||
- yum # some versions of ansible use yum
|
||||
- libselinux-python
|
11
contrib/ansible/roles/pre-ansible/tasks/main.yml
Normal file
11
contrib/ansible/roles/pre-ansible/tasks/main.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Get os_version from /etc/os-release
|
||||
raw: "grep '^VERSION_ID=' /etc/os-release | sed s'/VERSION_ID=//'"
|
||||
register: os_version
|
||||
|
||||
- name: Get distro name from /etc/os-release
|
||||
raw: "grep '^NAME=' /etc/os-release | sed s'/NAME=//'"
|
||||
register: distro
|
||||
|
||||
- include: fedora-dnf.yml
|
||||
when: os_version.stdout|int >= 22 and 'Fedora' in distro.stdout
|
Loading…
Reference in New Issue
Block a user