Skip to content

Commit

Permalink
Revert "Fixed Molecule (#1282)"
Browse files Browse the repository at this point in the history
This reverts commit a27bb25.
  • Loading branch information
pyrodie18 authored Jun 9, 2024
1 parent a27bb25 commit 562a3c8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ jobs:

- name: Run role tests
run: >-
MY_MOLECULE_CONTAINER=${{ matrix.container }}
MY_MOLECULE_IMAGE=${{ matrix.container }}
MY_MOLECULE_CONTAINER=${{ matrix.container.name }}
MY_MOLECULE_IMAGE=${{ matrix.container.base_image }}
MY_MOLECULE_OS_FAMILY=${{ matrix.container.os_family }}
MY_MOLECULE_VERSION=${{ matrix.version }}
MY_MOLECULE_DATABASE=${{ matrix.database }}
MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }}
molecule test -s ${{ matrix.collection_role }}
3 changes: 3 additions & 0 deletions molecule/zabbix_proxy/Dockerfile.redhat.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM {{ item.base_image }}
RUN yum install -y python3-pip
CMD ["/sbin/init"]
23 changes: 23 additions & 0 deletions molecule/zabbix_proxy/destroy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
- name: Destroy
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
vars:
molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
molecule_yml: "{{ lookup('file', molecule_file) | from_yaml }}"
tasks:
- name: Destroy molecule instance(s)
docker_container:
name: "{{ item.name }}"
state: absent
force_kill: "{{ item.force_kill | default(True) }}"
with_items: "{{ molecule_yml.platforms }}"

- name: Destroy 3rd party instance(s)
docker_container:
name: "{{ item.name }}-db"
state: absent
force_kill: true
loop: "{{ molecule_yml.platforms }}"
7 changes: 4 additions & 3 deletions molecule/zabbix_proxy/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ driver:
name: docker
platforms:
- name: zabbix-proxy-${MY_MOLECULE_VERSION:-v70}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
dockerfile: Dockerfile.${MY_MOLECULE_OS_FAMILY:-redhat}.j2
base_image: ${MY_MOLECULE_IMAGE:-rockylinux/rockylinux:8-ubi-init}
image: ${MY_MOLECULE_CONTAINER:-rockylinux8}
privileged: true
pre_build_image: true
command: ${MOLECULE_DOCKER_COMMAND:-""}
command: /sbin/init
networks:
- name: zabbix
volumes:
Expand Down

0 comments on commit 562a3c8

Please sign in to comment.