ansible-collections / community.zabbix

Zabbix Ansible modules
http://galaxy.ansible.com/community/zabbix
Other
329 stars 285 forks source link

zabbix.template broken for Zabbix < 5.4 #1192

Closed richlv closed 8 months ago

richlv commented 8 months ago
SUMMARY

Template importing fails with Zabbix 5.0, attempts to use non-existent method "configuration.importcompare". This method was added in Zabbix 5.4.

ISSUE TYPE
COMPONENT NAME

zabbix.template

ANSIBLE VERSION
ansible [core 2.15.8]
  config file = /opt/ansible/config/ansible-config-host.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/venv-ansible/lib64/python3.9/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/venv-ansible/bin/ansible
  python version = 3.9.18 (main, Sep 22 2023, 17:58:34) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/opt/venv-ansible/bin/python3.9)
  jinja version = 3.1.3
  libyaml = True
CONFIGURATION
CONFIG_FILE() = /opt/ansible/config/ansible-config-host.cfg
DEFAULT_FORKS(/opt/ansible/config/ansible-config-host.cfg) = 100
RETRY_FILES_ENABLED(/opt/ansible/config/ansible-config-host.cfg) = False
OS / ENVIRONMENT / Zabbix Version

Zabbix 5.0 Collection 93b1fc1 from January 12th.

STEPS TO REPRODUCE

Have a template imported in Zabbix 5.0.

EXPECTED RESULTS

Works.

ACTUAL RESULTS
"msg": "connection error occurred: REST API returned {'code': -32601, 'message': 'Method not found.', 'data': 'Incorrect method \"configuration.importcompare\".'} when sending {\"jsonrpc\": \"2.0\", \"method\": \"configuration.importcompare\", \"id\":
...
pyrodie18 commented 8 months ago

If you look in https://github.com/ansible-collections/community.zabbix?tab=readme-ov-file#supported-zabbix-versions we only support "Fully Supported" versions of Zabbix which is currently >= 6.0. If you go back and use version 1.9.3 of the collection it has support for 5.0

richlv commented 7 months ago

Thank you so much for the response. I had checked the docs before, and it seemed to me that 5.0, being a supported LTS version, would still be supported - but it seems that this fell under the "full support" axe.

If it's not too much of an extra effort, would an explicit supported version list for modules reduce potential confusion?