---
driver:
  name: docker

platforms:
  - name: zabbix-agent-${MY_MOLECULE_CONTAINER:-centos}
    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:-agent}

provisioner:
  name: ansible
  lint:
    name: ansible-lint
  env:
    ANSIBLE_REMOTE_TMP: /tmp/
    ANSIBLE_COLLECTIONS_PATHS: $HOME/.ansible/collections/ansible_collections/community/zabbix
    ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles
  inventory:
    host_vars:
      zabbix-agent-centos2:
        zabbix_agent2: true
        zabbix_agent2_tlsconnect: psk
        zabbix_agent2_tlsaccept: psk
        zabbix_agent2_tlspskidentity: my_Identity
        zabbix_agent2_tlspskfile: /data/certs/zabbix.psk
        zabbix_agent2_tlspsk_secret: 97defd6bd126d5ba7fa5f296595f82eac905d5eda270207a580ab7c0cb9e8eab
        zabbix_agent2_plugins:
          - name: SystemRun
            options:
              - parameter: LogRemoteCommands
                value: 0
    group_vars:
      all:
        zabbix_agent_src_reinstall: False
        zabbix_install_pip_packages: False
        zabbix_agent_server: 192.168.3.33
        zabbix_agent_serveractive: 192.168.3.33
        zabbix_agent_listenip: 0.0.0.0
        zabbix_agent_tlsconnect: psk
        zabbix_agent_tlsaccept: psk
        zabbix_agent_tlspskidentity: my_Identity
        zabbix_agent_tlspskfile: /data/certs/zabbix.psk
        zabbix_agent_tlspsk_secret: 97defd6bd126d5ba7fa5f296595f82eac905d5eda270207a580ab7c0cb9e8eab

scenario:
  test_sequence:
    - dependency
    - lint
    - cleanup
    - destroy
    - syntax
    - create
    - prepare
    - converge
    # - idempotence
    - side_effect
    - verify
    - cleanup
    - destroy
verifier:
  name: testinfra
  lint:
    name: flake8
