From: Anil Belur Date: Fri, 12 Dec 2025 06:58:27 +0000 (+1000) Subject: Feat: Update to Podman, Ubuntu 24.04, CS Stream 9 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=34bf2c29363b250e02b2984117f51fe5ebcb3067;p=ansible%2Froles%2Fhaveged-install.git Feat: Update to Podman, Ubuntu 24.04, CS Stream 9 - Switch from Docker to Podman driver for Molecule tests - Add Ubuntu 24.04 and CentOS Stream 9 platform support - Remove EOL platforms (Ubuntu 18.04, 20.04, CentOS 7/8) - Update GitHub Actions workflow: - Install Podman on runners - Use requirements.txt for Python dependencies - Set MOLECULE_PROJECT_DIRECTORY and ANSIBLE_ROLES_PATH - Add gather_facts: true to converge.yml - Add requirements.txt with molecule-plugins[podman] Change-Id: Ie7124ce0b0190ce0a51a7d5cd6d2debcdb5fc596 Signed-off-by: Anil Belur --- diff --git a/.github/workflows/gerrit-verify.yaml b/.github/workflows/gerrit-verify.yaml index 040838b..9566ade 100644 --- a/.github/workflows/gerrit-verify.yaml +++ b/.github/workflows/gerrit-verify.yaml @@ -111,8 +111,9 @@ jobs: strategy: matrix: distro: - - ubuntu2004 - ubuntu2204 + - ubuntu2404 + - centos-stream9 fail-fast: false steps: - name: Gerrit Checkout @@ -123,17 +124,21 @@ jobs: 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() }} diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 1e30adc..a8044fd 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -1,5 +1,6 @@ --- - name: Converge hosts: all + gather_facts: true roles: - role: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index ece185b..e6f9a96 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -2,21 +2,30 @@ 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: ubuntu2004 - image: ubuntu:20.04 - name: ubuntu2204 image: ubuntu:22.04 + - name: ubuntu2404 + image: ubuntu:24.04 + - name: centos-stream9 + image: quay.io/centos/centos:stream9 provisioner: name: ansible scenario: name: default + test_sequence: + - dependency + - cleanup + - destroy + - syntax + - create + - prepare + - converge + - idempotence + - side_effect + - verify + - cleanup + - destroy verifier: name: testinfra diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0ec030c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +ansible +ansible-lint +molecule +molecule-plugins[podman]