Browse Source

Use podman driver with molecule

Change-Id: I3d16e7e7de8afe123ee2b7175c242ceaf3c0af65
changes/66/819266/9
Sagi Shnaidman 6 months ago committed by Shnaidman Sagi (Sergey)
parent
commit
0913c46357
  1. 4
      roles/collect_logs/molecule/default/molecule.yml
  2. 4
      roles/collect_logs/molecule/infrared/molecule.yml
  3. 5
      tox.ini
  4. 10
      zuul.d/layout.yaml
  5. 25
      zuul.d/playbooks/pre.yml

4
roles/collect_logs/molecule/default/molecule.yml

@ -1,6 +1,6 @@
---
driver:
name: docker
name: podman
log: true
platforms:
# - name: centos7
@ -22,8 +22,6 @@ provisioner:
forks: 50
stdout_callback: yaml
timeout: 30
ssh_connection:
pipelining: true
inventory:
group_vars:
all:

4
roles/collect_logs/molecule/infrared/molecule.yml

@ -1,6 +1,6 @@
---
driver:
name: docker
name: podman
log: true
platforms:
# - name: centos7
@ -22,8 +22,6 @@ provisioner:
forks: 50
stdout_callback: yaml
timeout: 30
ssh_connection:
pipelining: true
inventory:
group_vars:
all:

5
tox.ini

@ -13,6 +13,7 @@ usedevelop = True
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
PODMAN_*
DOCKER_*
HOME
REQUESTS_CA_BUNDLE
@ -60,11 +61,11 @@ setenv =
PYTEST_REQPASS=2
deps =
ansible-core>=2.11,<2.12
molecule[test,docker]>=3.3.2,<3.4 # MIT
molecule[test,podman]>=3.3.2,<3.4 # MIT
pytest-molecule>=1.4.0
pytest-plus # provides support for PYTEST_REQPASS
commands =
ansible-galaxy collection install --force community.docker:=1.10.0 community.general:=4.0.2
ansible-galaxy collection install --force containers.podman:=1.8.2 community.general:=4.0.2
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} -k molecule {posargs}
[testenv:ansible]

10
zuul.d/layout.yaml

@ -27,13 +27,21 @@
irrelevant-files:
- ^vars/sova-patterns.yml$
- job:
description: Molecule job
name: tripleo-logs-tox-molecule
parent: tripleo-tox-molecule
pre-run:
- zuul.d/playbooks/pre.yml
timeout: 3600
- project:
vars:
fail_logs_collection: true
check:
jobs: &jobs
- openstack-tox-linters
- openstack-tox-molecule
- tripleo-logs-tox-molecule
- tox-ansible-test-sanity
- tox-ansible-test-units
- zuul-ansible-role-collect-logs

25
zuul.d/playbooks/pre.yml

@ -0,0 +1,25 @@
---
- hosts: all
tasks:
- name: Remove docker from molecule
become: true
package:
name:
- docker-ce
- docker-ce-cli
- containerd.io
state: absent
- name: Set containers module to 3.0
become: true
shell: |
dnf module disable container-tools:rhel8 -y
dnf module enable container-tools:3.0 -y
dnf clean metadata
tags:
- skip_ansible_lint
- name: Install podman
include_role:
name: ensure-podman
Loading…
Cancel
Save