---
dependency:
  name: galaxy
  enabled: true
  options:
    requirements-file: molecule/default/collections.yml

driver:
  name: default

platforms:
  - name: zabbix-repo-${MY_MOLECULE_VERSION:-v72}-${MY_MOLECULE_CONTAINER:-rockylinux8}
    image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest
    privileged: true
    pre_build_image: true
    command: ${MOLECULE_DOCKER_COMMAND:-""}
    networks:
      - name: zabbix
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:rw
    cgroupns_mode: host
    groups:
      - ${MY_MOLECULE_VERSION:-v72}

provisioner:
  name: ansible
  playbooks:
    create: ../default/create.docker.yml
    destroy: ../default/destroy.docker.yml
  env:
    # https://github.com/ansible/molecule/issues/4015#issuecomment-1680859724
    ANSIBLE_ROLES_PATH: ../../roles
  inventory:
    group_vars:
      all:
        ansible_connection: community.docker.docker
        zabbix_repo_apt_priority: 1
        zabbix_repo_yum_gpg_check: 1
      v72:
        zabbix_server_version: 7.2
      v70:
        zabbix_server_version: 7.0
      v64:
        zabbix_server_version: 6.4
      v60:
        zabbix_server_version: 6.0

verifier:
  name: testinfra
