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:
Eric Paris 2015-06-23 13:16:08 -04:00
parent 7996f39413
commit fc5c063a2d
4 changed files with 28 additions and 1 deletions

View File

@ -1,4 +1,12 @@
---
- hosts: all
gather_facts: false
sudo: yes
roles:
- pre-ansible
tags:
- pre-ansible
# Install etcd
- hosts: etcd
sudo: yes

View File

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

View 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

View 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