summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/zabbix/molecule/zabbix_proxy
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/zabbix/molecule/zabbix_proxy')
-rw-r--r--ansible_collections/community/zabbix/molecule/zabbix_proxy/destroy.yml6
-rw-r--r--ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml10
-rw-r--r--ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml4
3 files changed, 9 insertions, 11 deletions
diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/destroy.yml b/ansible_collections/community/zabbix/molecule/zabbix_proxy/destroy.yml
index 54771a5a1..7ef374be5 100644
--- a/ansible_collections/community/zabbix/molecule/zabbix_proxy/destroy.yml
+++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/destroy.yml
@@ -17,9 +17,7 @@
- name: Destroy 3rd party instance(s)
docker_container:
- name: '{{ item }}'
+ name: "{{ item.name }}-db"
state: absent
force_kill: true
- with_items:
- - mysql-host
- - postgresql-host
+ loop: "{{ molecule_yml.platforms }}"
diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml b/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml
index 4eb173acf..4eadd60ab 100644
--- a/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml
+++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml
@@ -2,7 +2,7 @@
driver:
name: docker
platforms:
- - name: zabbix-proxy-${MY_MOLECULE_CONTAINER:-centos}
+ - name: zabbix-proxy-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8}
image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
privileged: true
pre_build_image: true
@@ -37,19 +37,19 @@ provisioner:
zabbix_proxy_dbuser: zabbix-dbuser
zabbix_proxy_database: mysql
zabbix_proxy_dbport: 3306
- zabbix_proxy_dbhost: mysql-host
+ zabbix_proxy_dbhost: "{{ inventory_hostname }}-db"
zabbix_proxy_dbhost_run_install: false
zabbix_proxy_privileged_host: "%"
- zabbix_proxy_mysql_login_host: mysql-host
+ zabbix_proxy_mysql_login_host: "{{ inventory_hostname }}-db"
zabbix_proxy_mysql_login_user: root
zabbix_proxy_mysql_login_password: changeme
zabbix_proxy_mysql_login_port: 3306
pgsql:
zabbix_proxy_database: pgsql
zabbix_proxy_dbport: 5432
- zabbix_proxy_dbhost: postgresql-host
+ zabbix_proxy_dbhost: "{{ inventory_hostname }}-db"
zabbix_proxy_dbhost_run_install: false
- zabbix_proxy_pgsql_login_host: postgresql-host
+ zabbix_proxy_pgsql_login_host: "{{ inventory_hostname }}-db"
zabbix_proxy_pgsql_login_user: postgres
zabbix_proxy_pgsql_login_password: changeme
zabbix_proxy_pgsql_login_port: 5432
diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml b/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml
index c5e3b9e45..1ff492d62 100644
--- a/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml
+++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml
@@ -5,7 +5,7 @@
pre_tasks:
- name: "Create MySQL Container"
docker_container:
- name: mysql-host
+ name: "{{ item.name }}-db"
image: mysql:8.0
state: started
recreate: true
@@ -20,7 +20,7 @@
- name: "Create postgresql Container"
docker_container:
- name: postgresql-host
+ name: "{{ item.name }}-db"
image: postgres:13
state: started
recreate: true