strategy:
matrix:
distro:
- - ubuntu2004
- ubuntu2204
+ - ubuntu2404
fail-fast: false
steps:
- name: Gerrit Checkout
gerrit-project: ${{ inputs.GERRIT_PROJECT }}
gerrit-url: ${{ vars.GERRIT_URL }}
delay: "0s"
- - name: Install test dependencies.
+ - name: Install Podman
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y podman
+ - name: Install test dependencies
run: |
python -m pip install --upgrade pip
- pip3 install ansible ansible-lint molecule-plugins[docker] docker
- - name: Run Molecule tests.
- run: molecule test
- working-directory: ${{env.working-directory}}
+ pip3 install -r requirements.txt
+ - name: Run Molecule tests
+ run: molecule test --platform-name ${{ matrix.distro }}
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
- MOLECULE_PLATFORM_NAME: ${{ matrix.distro }}
+ MOLECULE_PROJECT_DIRECTORY: "${{ github.workspace }}"
+ ANSIBLE_ROLES_PATH: "${{ github.workspace }}/.."
vote:
if: ${{ always() }}
--- /dev/null
+[defaults]
+roles_path = ..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
+deprecation_warnings = False
+inject_facts_as_vars = False
+
+[privilege_escalation]
+become = True
- bionic
- focal
- jammy
+ - noble
galaxy_tags:
- pyenv
dependency:
name: galaxy
driver:
- name: docker
+ name: podman
platforms:
- # - name: centos7
- # image: centos:7
- # - name: centos8
- # image: quay.io/centos/centos:stream8
- # - name: ubuntu1804
- # image: ubuntu:18.04
+ - name: centos7
+ image: centos:7
+ - name: centos8
+ image: quay.io/centos/centos:stream8
+ - name: ubuntu1804
+ image: ubuntu:18.04
- name: ubuntu2004
image: ubuntu:20.04
- name: ubuntu2204
image: ubuntu:24.04
provisioner:
name: ansible
- # Fix for role path finding in latest molecule versions (~25.4.0)
- env:
- ANSIBLE_ROLES_PATH: ../../../
scenario:
name: default
test_sequence:
+ - dependency
+ - cleanup
- destroy
- dependency
- syntax
- create
- prepare
- converge
+ - idempotence
- side_effect
- verify
+ - cleanup
- destroy
+verifier:
+ name: testinfra
--- /dev/null
+ansible
+ansible-lint
+molecule
+molecule-plugins[podman]
name: '{{ python_packages }}'
state: present
+- name: Install virtualenv via pip on EL9 (broken RPM deps)
+ become: true
+ ansible.builtin.pip:
+ name: virtualenv
+ state: present
+ executable: pip3
+ when:
+ - ansible_distribution == 'CentOS' and ansible_distribution_major_version | int >= 9
+
- name: Set Python version on Ubuntu >= 18.04 or CentOS 7
ansible.builtin.set_fact:
pyenv_cmd: "{{ python_versions | join(' ') }}"
--- /dev/null
+---
+python_packages_distro:
+ - libffi-devel
+ - python3
+ - python3-devel
+ - python3-pip
+ - python3-setuptools
+ - python3-virtualenv
--- /dev/null
+---
+# CentOS Stream 9 uses Python 3.9+ as default
+# No python36, python38, or openssl11 packages available
+# python3-virtualenv from EPEL has broken deps; install via pip instead
+python_packages_distro:
+ - libffi-devel
+ - python3
+ - python3-devel
+ - python3-pip
+ - python3-setuptools