From 825d112b16a86c29c7c6143d716f5f7fb96162be Mon Sep 17 00:00:00 2001 From: Troy W Date: Sun, 9 Jun 2024 01:03:01 -0400 Subject: [PATCH] Fixed Molecule Testing Correctly (#1284) --- .github/workflows/proxy.yml | 6 +++--- molecule/zabbix_proxy/Dockerfile.debian.j2 | 3 --- molecule/zabbix_proxy/Dockerfile.redhat.j2 | 3 --- molecule/zabbix_proxy/molecule.yml | 7 +++---- 4 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 molecule/zabbix_proxy/Dockerfile.debian.j2 delete mode 100644 molecule/zabbix_proxy/Dockerfile.redhat.j2 diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index 8579e2e28..c77294fbc 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -76,9 +76,9 @@ jobs: - name: Run role tests run: >- - MY_MOLECULE_CONTAINER=${{ matrix.container.name }} - MY_MOLECULE_IMAGE=${{ matrix.container.base_image }} - MY_MOLECULE_OS_FAMILY=${{ matrix.container.os_family }} + MY_MOLECULE_CONTAINER=${{ matrix.container }} + MY_MOLECULE_IMAGE=${{ matrix.container }} MY_MOLECULE_VERSION=${{ matrix.version }} MY_MOLECULE_DATABASE=${{ matrix.database }} + MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} molecule test -s ${{ matrix.collection_role }} diff --git a/molecule/zabbix_proxy/Dockerfile.debian.j2 b/molecule/zabbix_proxy/Dockerfile.debian.j2 deleted file mode 100644 index b3d90f2a5..000000000 --- a/molecule/zabbix_proxy/Dockerfile.debian.j2 +++ /dev/null @@ -1,3 +0,0 @@ -FROM {{ item.base_image }} -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip systemd-sysv -CMD ["/sbin/init"] diff --git a/molecule/zabbix_proxy/Dockerfile.redhat.j2 b/molecule/zabbix_proxy/Dockerfile.redhat.j2 deleted file mode 100644 index dd48ee3b7..000000000 --- a/molecule/zabbix_proxy/Dockerfile.redhat.j2 +++ /dev/null @@ -1,3 +0,0 @@ -FROM {{ item.base_image }} -RUN yum install -y python3-pip -CMD ["/sbin/init"] diff --git a/molecule/zabbix_proxy/molecule.yml b/molecule/zabbix_proxy/molecule.yml index 8c7b3df48..ac0d7e33c 100644 --- a/molecule/zabbix_proxy/molecule.yml +++ b/molecule/zabbix_proxy/molecule.yml @@ -3,11 +3,10 @@ driver: name: docker platforms: - name: zabbix-proxy-${MY_MOLECULE_VERSION:-v70}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8} - dockerfile: Dockerfile.${MY_MOLECULE_OS_FAMILY:-redhat}.j2 - base_image: ${MY_MOLECULE_IMAGE:-rockylinux/rockylinux:8-ubi-init} - image: ${MY_MOLECULE_CONTAINER:-rockylinux8} + image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest privileged: true - command: /sbin/init + pre_build_image: true + command: ${MOLECULE_DOCKER_COMMAND:-""} networks: - name: zabbix volumes: