Feat: Update java-install for Ubuntu 24.04 with Podman 72/73972/1
authorAnil Belur <abelur@linuxfoundation.org>
Thu, 11 Dec 2025 14:29:39 +0000 (00:29 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Fri, 12 Dec 2025 02:04:09 +0000 (12:04 +1000)
- Switch from Docker to Podman driver for molecule tests
- Update GitHub workflow to install Podman and use requirements.txt
- Add Ubuntu 24.04 (noble) to supported platforms
- Create ansible.cfg with roles_path and deprecation settings
- Add requirements.txt for molecule dependencies
- Update molecule platforms to ubuntu2204 and ubuntu2404
- Set MOLECULE_PROJECT_DIRECTORY and ANSIBLE_ROLES_PATH in workflow

Change-Id: Ie69de29bb2d1d6434b8b29ae775ad8c2e48c5391
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
.github/workflows/gerrit-verify.yaml
ansible.cfg [new file with mode: 0644]
meta/main.yml
molecule/default/molecule.yml
requirements.txt [new file with mode: 0644]

index 040838b..2eae8b1 100644 (file)
@@ -111,8 +111,8 @@ jobs:
     strategy:
       matrix:
         distro:
-          - ubuntu2004
           - ubuntu2204
+          - ubuntu2404
       fail-fast: false
     steps:
       - name: Gerrit Checkout
@@ -123,17 +123,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/ansible.cfg b/ansible.cfg
new file mode 100644 (file)
index 0000000..7b146e2
--- /dev/null
@@ -0,0 +1,7 @@
+[defaults]
+roles_path = ..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
+deprecation_warnings = False
+inject_facts_as_vars = False
+
+[privilege_escalation]
+become = True
index 3b80d2f..db5e280 100644 (file)
@@ -23,6 +23,7 @@ galaxy_info:
         - bionic
         - focal
         - jammy
+        - noble
 
   galaxy_tags:
     - java
index e6194ba..007e8f2 100644 (file)
@@ -2,24 +2,23 @@
 dependency:
   name: galaxy
 driver:
-  name: docker
+  name: podman
 platforms:
-  # - name: centos7
-  #   image: centos:7
-  # - name: centos8
-  #   image: quay.io/centos/centos:stream8
-  # - name: centos9
-  #   image: quay.io/centos/centos:stream9
-  # - name: ubuntu1804
-  #   image: ubuntu:18.04
-  - name: ubuntu2004
-    image: ubuntu:20.04
   - name: ubuntu2204
     image: ubuntu:22.04
+    pre_build_image: false
   - name: ubuntu2404
     image: ubuntu:24.04
+    pre_build_image: false
 provisioner:
   name: ansible
-  # Fix for role path finding in latest molecule versions (~25.4.0)
   env:
-    ANSIBLE_ROLES_PATH: ../../../
+    ANSIBLE_CONFIG: ${MOLECULE_PROJECT_DIRECTORY}/ansible.cfg
+  inventory:
+    host_vars:
+      ubuntu2204:
+        ansible_python_interpreter: /usr/bin/python3
+      ubuntu2404:
+        ansible_python_interpreter: /usr/bin/python3
+verifier:
+  name: ansible
diff --git a/requirements.txt b/requirements.txt
new file mode 100644 (file)
index 0000000..0ec030c
--- /dev/null
@@ -0,0 +1,4 @@
+ansible
+ansible-lint
+molecule
+molecule-plugins[podman]