diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d34029b..33a9b6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,20 @@ jobs: molecule: name: Molecule Test runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - name: ubuntu2204 + image: docker.io/geerlingguy/docker-ubuntu2204-ansible:latest + - name: debian12 + image: docker.io/geerlingguy/docker-debian12-ansible + - name: fedora39 + image: docker.io/geerlingguy/docker-fedora39-ansible + - name: fedora38 + image: docker.io/geerlingguy/docker-fedora38-ansible + - name: centosstream9 + image: ghcr.io/bcook254/docker-centosstream9-ansible steps: - name: Check out the codebase. uses: actions/checkout@v4 @@ -55,8 +69,10 @@ jobs: run: python -m pip install ansible molecule molecule-plugins[docker] docker - name: Run Molecule tests. - run: molecule test --driver-name docker --scenario-name all + run: molecule test --driver-name docker --scenario-name ci env: + PLATFORM_NAME: ${{ matrix.platform.name }} + PLATFORM_IMAGE: ${{ matrix.platform.image }} VAULTWARDEN_VERSION: '1.30.5' VAULTWARDEN_URL: ${{ secrets.VAULTWARDEN_URL }} PY_COLORS: '1' diff --git a/molecule/all/molecule.yml b/molecule/all/molecule.yml deleted file mode 100644 index 7701cd8..0000000 --- a/molecule/all/molecule.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- -dependency: - name: galaxy - options: - requirements-file: requirements.yml -driver: - name: podman -platforms: - - name: ubuntu2204 - image: docker.io/geerlingguy/docker-ubuntu2204-ansible - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - privileged: true - cgroupns_mode: host - pre_build_image: true - - name: debian12 - image: docker.io/geerlingguy/docker-debian12-ansible - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - privileged: true - cgroupns_mode: host - pre_build_image: true - - name: fedora39 - image: docker.io/geerlingguy/docker-fedora39-ansible - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - privileged: true - cgroupns_mode: host - pre_build_image: true - - name: fedora38 - image: docker.io/geerlingguy/docker-fedora38-ansible - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - privileged: true - cgroupns_mode: host - pre_build_image: true - - name: centosstream9 - image: ghcr.io/bcook254/docker-centosstream9-ansible - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - privileged: true - cgroupns_mode: host - pre_build_image: true -provisioner: - name: ansible - inventory: - group_vars: - all: - vaultwarden_version: "${VAULTWARDEN_VERSION}" - vaultwarden_url: "${VAULTWARDEN_URL}" - vaultwarden_url_checksum: "sha256:{{ vaultwarden_url }}.sha256" - host_vars: - centosstream9: - vaultwarden_packages: - - openssl - - ca-certificates - - curl-minimal - - mariadb-devel - - libpq - config_options: - defaults: - interpreter_python: auto_silent - callbacks_enabled: yaml - ssh_connection: - pipelining: false -verifier: - name: ansible -lint: | - set -e - ansible-lint . \ No newline at end of file diff --git a/molecule/all/converge.yml b/molecule/ci/converge.yml similarity index 100% rename from molecule/all/converge.yml rename to molecule/ci/converge.yml diff --git a/molecule/ci/molecule.yml b/molecule/ci/molecule.yml new file mode 100644 index 0000000..a264d0b --- /dev/null +++ b/molecule/ci/molecule.yml @@ -0,0 +1,43 @@ +--- +dependency: + name: galaxy + options: + requirements-file: requirements.yml +driver: + name: podman +platforms: + - name: ${PLATFORM_NAME} + image: ${PLATFORM_IMAGE} + command: ${MOLECULE_DOCKER_COMMAND:-""} + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host + privileged: true + pre_build_image: true +provisioner: + inventory: + group_vars: + all: + vaultwarden_version: "${VAULTWARDEN_VERSION}" + vaultwarden_url: "${VAULTWARDEN_URL}" + vaultwarden_url_checksum: "sha256:{{ vaultwarden_url }}.sha256" + host_vars: + centosstream9: + vaultwarden_packages: + - openssl + - ca-certificates + - curl-minimal + - mariadb-devel + - libpq + name: ansible + config_options: + defaults: + interpreter_python: auto_silent + callbacks_enabled: yaml + ssh_connection: + pipelining: false +verifier: + name: ansible +lint: | + set -e + ansible-lint . \ No newline at end of file diff --git a/molecule/all/prepare.yml b/molecule/ci/prepare.yml similarity index 100% rename from molecule/all/prepare.yml rename to molecule/ci/prepare.yml diff --git a/molecule/all/requirements.yml b/molecule/ci/requirements.yml similarity index 100% rename from molecule/all/requirements.yml rename to molecule/ci/requirements.yml diff --git a/molecule/all/verify.yml b/molecule/ci/verify.yml similarity index 100% rename from molecule/all/verify.yml rename to molecule/ci/verify.yml