Skip to content

Commit

Permalink
Fixed Rocky 8 Prepare and all molecule defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 committed Jun 7, 2024
1 parent 91242bb commit 368133e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 22 deletions.
2 changes: 1 addition & 1 deletion molecule/zabbix_agent_tests/common/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- agent
- ${MY_MOLECULE_VERSION:-v64}
- ${MY_MOLECULE_VERSION:-v70}

provisioner:
name: ansible
Expand Down
4 changes: 2 additions & 2 deletions molecule/zabbix_javagateway/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ driver:
name: docker

platforms:
- name: zabbix-server-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
- name: zabbix-server-${MY_MOLECULE_VERSION:-v70}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
privileged: true
pre_build_image: true
Expand All @@ -13,7 +13,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- ${MY_MOLECULE_VERSION:-v64}
- ${MY_MOLECULE_VERSION:-v70}
provisioner:
name: ansible
env:
Expand Down
4 changes: 2 additions & 2 deletions molecule/zabbix_proxy/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
driver:
name: docker
platforms:
- name: zabbix-proxy-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
- 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}
Expand All @@ -14,7 +14,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- ${MY_MOLECULE_DATABASE:-mysql}
- ${MY_MOLECULE_VERSION:-v64}
- ${MY_MOLECULE_VERSION:-v70}

provisioner:
name: ansible
Expand Down
4 changes: 2 additions & 2 deletions molecule/zabbix_repo/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
driver:
name: docker
platforms:
- name: zabbix-repo-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_CONTAINER:-rockylinux8}
- name: zabbix-repo-${MY_MOLECULE_VERSION:-v70}-${MY_MOLECULE_CONTAINER:-rockylinux8}
image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
privileged: true
pre_build_image: true
Expand All @@ -12,7 +12,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- ${MY_MOLECULE_VERSION:-v64}
- ${MY_MOLECULE_VERSION:-v70}

provisioner:
name: ansible
Expand Down
2 changes: 1 addition & 1 deletion molecule/zabbix_server/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
driver:
name: docker
platforms:
- name: zabbix-server-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
- name: zabbix-server-${MY_MOLECULE_VERSION:-v70}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
privileged: true
pre_build_image: true
Expand Down
4 changes: 2 additions & 2 deletions molecule/zabbix_web/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependency:
driver:
name: docker
platforms:
- name: zabbix-web-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
- name: zabbix-web-${MY_MOLECULE_VERSION:-v70}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
privileged: true
pre_build_image: true
Expand All @@ -21,7 +21,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- ${MY_MOLECULE_DATABASE:-mysql}
- ${MY_MOLECULE_VERSION:-v64}
- ${MY_MOLECULE_VERSION:-v70}
- ${MY_MOLECULE_WEB_SERVER:-apache}

provisioner:
Expand Down
27 changes: 15 additions & 12 deletions molecule/zabbix_web/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@
when:
- ansible_os_family == 'RedHat'

- name: "Installing packages (CentOS7)"
ansible.builtin.yum:
name:
- centos-release-scl
state: present
register: installation_dependencies
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version == '7'

- name: "Installing MySQL on CentOS"
ansible.builtin.yum:
name:
Expand Down Expand Up @@ -122,8 +112,21 @@
when:
- inventory_hostname in groups['mysql']

- name: Enabeling PHP 7.4
ansible.builtin.command: dnf module enable php:7.4 -y
- name: Enabeling PHP 8.0
block:
- name: Add epel
ansible.builtin.include_role:
name: geerlingguy.repo-epel

- name: Add remi
ansible.builtin.include_role:
name: geerlingguy.repo-remi

- name: Reset dnf library
ansible.builtin.shell: dnf module reset php

- name: Set php Version
ansible.builtin.shell: dnf module enable -y php:remi-8.0
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version == "8"
Expand Down
2 changes: 2 additions & 0 deletions molecule/zabbix_web/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
- src: geerlingguy.apache
- src: geerlingguy.nginx
- src: geerlingguy.php
- src: geerlingguy.repo-epel
- src: geerlingguy.repo-remi

0 comments on commit 368133e

Please sign in to comment.