Install yum on CentOS8/Fedora

Currently beaker-puppet requires yum command while installing required
packages, and it fails on CentOS8/Fedora which doesn't have yum by
default.
This patch makes sure that yum is installed while preparing a test node
so that we can avoid the error caused by missing yum.

Change-Id: I780d2d221f0209e914514398c61c7a45fa33ffcf
This commit is contained in:
Takashi Kajinami 2020-05-11 00:43:07 +09:00
parent baecae0460
commit 5ee64a6881

View File

@ -74,6 +74,11 @@
- ruby-devel - ruby-devel
- zlib-devel - zlib-devel
- name: Install yum (Fedora or CentOS/RHEL>=8)
dnf:
name: yum
become: true
when: when:
- ansible_os_family == 'RedHat' - ansible_os_family == 'RedHat'
- ansible_distribution == "Fedora" or ansible_distribution_major_version >= "8" - ansible_distribution == "Fedora" or ansible_distribution_major_version >= "8"