Install system dependencies for tox-molecule

Avoids the need to add complex bindep.txt on each repository that
uses molecule by adding the boostraping of dependencies directly
in the job definition.

This was already tested on CentOS/Fedora/RHEL via
https://review.rdoproject.org/r/#/c/21486/

Change-Id: I2a3b1143b566b31fb866f7c3ecae7ff0276cb246
This commit is contained in:
Sorin Sbarnea 2019-07-16 14:13:13 +01:00
parent 6cec9080a0
commit 440592a560

View File

@ -1,3 +1,29 @@
- hosts: all
roles:
- install-docker
tasks:
# psutil->python-devel
# psutil->gcc
# ansible->selinux
- name: install packages needed by molecule
when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int >= 8
become: true
package:
name:
- python2-devel
- python2-libselinux
- python3-devel
- python3-libselinux
- gcc
- name: install packages needed by molecule
when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int < 8
become: true
package:
name:
- python-devel
- libselinux-python
- gcc
- name: install docker
include_role:
name: install-docker