summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaikel Guemar <hguemar@fedoraproject.org>2020-08-11 15:35:00 +0200
committerHaikel Guemar <hguemar@fedoraproject.org>2020-08-13 18:10:43 +0200
commit7e6c45b9d823830bd5b316d485b570744f31a070 (patch)
treef71ba8525bdf394c1450375d60dd55d17e28c947
parentb9f920eae7141ab087d5f4929999228cfe11bf39 (diff)
Molecule: use podman by default and run both EL7/8HEADmaster
Change-Id: I47be1cda0b71c838e70d3cd8fe5c6764ad1014d8
-rw-r--r--molecule/default/Dockerfile.j27
-rw-r--r--molecule/default/converge.yml (renamed from molecule/default/playbook.yml)0
-rw-r--r--molecule/default/molecule.yml14
-rw-r--r--tox.ini9
4 files changed, 17 insertions, 13 deletions
diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2
index 0529528..f45ea7d 100644
--- a/molecule/default/Dockerfile.j2
+++ b/molecule/default/Dockerfile.j2
@@ -4,8 +4,11 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
-RUN yum install -y sudo && \
- yum clean all
+{% if item.image in ["centos:7"] %}
+RUN yum install -y sudo libselinux-python && yum clean all
+{% else %}
+RUN yum install -y sudo python3-libselinux && yum clean all
+{% endif %}
RUN adduser centos && \
echo 'centos ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/90-centos && \
diff --git a/molecule/default/playbook.yml b/molecule/default/converge.yml
index e9f1bd7..e9f1bd7 100644
--- a/molecule/default/playbook.yml
+++ b/molecule/default/converge.yml
diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml
index 417e623..305f9c5 100644
--- a/molecule/default/molecule.yml
+++ b/molecule/default/molecule.yml
@@ -3,17 +3,23 @@ dependency:
name: galaxy
enabled: false
driver:
- name: docker
-lint:
- name: yamllint
+ name: podman
+lint: |
+ yamllint tasks
platforms:
- name: el7
- image: centos:latest
+ image: centos:7
+ command: /sbin/init
+ capabilities:
+ - SYS_ADMIN
+ - name: el8
+ image: centos:8
command: /sbin/init
capabilities:
- SYS_ADMIN
provisioner:
name: ansible
+ log: true
connection_options:
ansible_user: centos
lint:
diff --git a/tox.ini b/tox.ini
index c02fb74..6c38386 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,19 +1,14 @@
[tox]
minversion = 1.8
-envlist = py{27,36}
+envlist = py36
skipsdist = true
[testenv]
passenv = *
deps =
- ansible>=2.7,<2.8
- docker
+ ansible>=2.8,<2.9
molecule
-[testenv:py27]
-commands =
- molecule test
-
[testenv:py36]
commands =
molecule test