---
dependency:
  name: galaxy
  enabled: true
  options:
    ignore-certs: True
    ignore-errors: True
    role-file: molecule/zabbix_web/requirements.yml

driver:
  name: docker
platforms:
  - name: zabbix-web-${MY_MOLECULE_CONTAINER:-mysql-centos8}
    image: ${MY_MOLECULE_IMAGE:-"geerlingguy/docker-centos8-ansible"}
    command: ${MY_MOLECULE_DOCKER_COMMAND:-""}
    privileged: True
    pre_build_image: True
    networks:
      - name: zabbix
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    groups:
      - ${MY_MOLECULE_GROUP:-mysql}

provisioner:
  name: ansible
  lint:
    name: ansible-lint
  env:
    ANSIBLE_COLLECTIONS_PATHS: $HOME/.ansible/collections/ansible_collections/community/zabbix
    ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles
  inventory:
    group_vars:
      mysql:
        zabbix_server_database: mysql
        zabbix_server_database_long: mysql
        zabbix_server_dbport: 3306
        zabbix_server_dbhost: mysql-host
        zabbix_server_dbhost_run_install: false
        zabbix_server_privileged_host: '%'
        zabbix_server_mysql_login_host: mysql-host
        zabbix_server_mysql_login_user: root
        zabbix_server_mysql_login_password: changeme
        zabbix_server_mysql_login_port: 3306
      postgresql:
        zabbix_server_database: pgsql
        zabbix_server_database_long: postgresql
        zabbix_server_dbport: 5432
        zabbix_server_dbhost: postgresql-host
        zabbix_server_dbhost_run_install: false
        zabbix_server_pgsql_login_host: postgresql-host
        zabbix_server_pgsql_login_user: postgres
        zabbix_server_pgsql_login_password: changeme
        zabbix_server_pgsql_login_port: 5432
    host_vars:
      zabbix-web-pgsql-debian:
        zabbix_websrv: apache
        php_default_version_debian: 7.4
        zabbix_php_fpm_conf_listen: False
        zabbix_url: zabbix-web-pgsql-debian
        zabbix_websrv_servername: zabbix-web-pgsql-debian
      zabbix-web-mysql-debian:
        zabbix_websrv: apache
        php_default_version_debian: 7.4
        zabbix_php_fpm_conf_listen: False
        zabbix_url: zabbix-web-mysql-debian
        zabbix_websrv_servername: zabbix-web-mysql-debian
      zabbix-web-pgsql-centos8:
        ansible_rhn_repo_disable_gpg_check: True
        zabbix_websrv: apache
        zabbix_php_fpm_conf_listen: False
        zabbix_url: zabbix-web-pgsql-centos8
        zabbix_websrv_servername: zabbix-web-pgsql-centos8
      zabbix-web-mysql-centos8:
        ansible_rhn_repo_disable_gpg_check: True
        php_fpm_pool_user: nginx
        php_fpm_pool_group: nginx
        zabbix_websrv: nginx
        zabbix_php_fpm_conf_listen: False
        zabbix_url: zabbix-web-mysql-centos8
        zabbix_websrv_servername: zabbix-web-mysql-centos8
      zabbix-web-mysql-ubuntu18:
        zabbix_websrv: nginx
        zabbix_php_fpm_conf_listen: False
        zabbix_url: zabbix-web-mysql-ubuntu18
        zabbix_websrv_servername: zabbix-web-mysql-ubuntu18
      zabbix-web-pgsql-ubuntu20:
        zabbix_php_fpm_conf_listen: False
        zabbix_websrv: apache
        zabbix_url: zabbix-web-pgsql-ubuntu20
        zabbix_websrv_servername: zabbix-web-pgsql-ubuntu20

verifier:
  name: testinfra
  lint:
    name: flake8
