ansible-collections/community.zabbix

Zabbix Agent deployment fails on Windows

david-sieg opened this issue · 1 comments

SUMMARY

Deployment fails at step: TASK [community.zabbix.zabbix_agent : Windows | Configure zabbix-agent]

Task template source is controlled by var zabbix_win_config_name, which is filled by task

set agent vars
and
set agent2 vars

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • name: "Windows | Configure zabbix-agent"
    ansible.windows.win_template:
    src: "{{ zabbix_win_config_name }}.j2"
    dest: "{{ zabbix_win_install_dir_conf }}\{{ zabbix_win_config_name }}"
    notify: restart win zabbix agent
    tags:
    • config
ANSIBLE VERSION

Ansible 2.15.5

OS / ENVIRONMENT / Zabbix Version

Zabbix 6.0, Windows Server 2022

EXPECTED RESULTS

Deployment of Zabbix Agent

ACTUAL RESULTS
fatal: [host.domain.local]: FAILED! => {"changed": false, "msg": "Could not find or access 'zabbix_agent2.conf.j2'\nSearched in:\n\t/root/.ansible/collections/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agent2.conf.j2\n\t/root/.ansible/collections/ansible_collections/community/zabbix/roles/zabbix_agent/zabbix_agent2.conf.j2\n\t/root/.ansible/collections/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/templates/zabbix_agent2.conf.j2\n\t/root/.ansible/collections/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/zabbix_agent2.conf.j2\n\t/builds/vandura/vantest/ddc2/vanm-test-windows-prod/vanm-manage-monitoring/templates/zabbix_agent2.conf.j2\n\t/builds/vandura/vantest/ddc2/vanm-test-windows-prod/vanm-manage-monitoring/zabbix_agent2.conf.j2 on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}

PR1311 fixes the issue.