community.zabbix
community.zabbix copied to clipboard
community.zabbix.zabbix_host module will send group id and name but only id is allowed in zabbix 7
SUMMARY
(https://www.zabbix.com/documentation/devel/en/manual/api/reference/host/create) The host groups must have only the groupid property defined.
before it was allowed now its not allowed anymore
ISSUE TYPE
- Bug Report
COMPONENT NAME
community.zabbix.zabbix_host module
ANSIBLE VERSION
ansible [core 2.14.13]
OS / ENVIRONMENT / Zabbix Version
rhel 9
STEPS TO REPRODUCE
run the https://docs.ansible.com/ansible/latest/collections/community/zabbix/zabbix_host_module.html to register a new host in zabbix 7
EXPECTED RESULTS
register the host in zabbix 7 and not fail on the error that the name is defined
ACTUAL RESULTS
fatal: [test-backupdb.intrrn.be -> 10.0.243.24({{ zabbix_api_server_host }})]: FAILED! => {"changed": false, "msg": "connection error occurred: REST API returned {'code': -32602, 'message': 'Invalid params.', 'data': 'Invalid parameter \"/1/groups/1\": unexpected parameter \"name\".'} when sending {\"jsonrpc\": \"2.0\", \"method\": \"host.create\", \"id\": \"3de91654-79a6-46b4-812a-2953ef95a2ee\", \"params\": {\"host\": \"xxxxxx\", \"interfaces\": [{\"type\": 1, \"main\": 1, \"useip\": 1, \"ip\": \"xxxxx\", \"dns\": \"xxxxx\", \"port\": \"10050\", \"details\": {}}], \"groups\": [{\"groupid\": \"25\", \"name\": \"Linux Servers\", \"flags\": \"0\", \"uuid\": \"xxxxxxxx\"}], \"status\": 0, \"tls_psk_identity\": \"Test-BackupDB\"}, \"auth\": \"xxxxxxxx\"}"}
Hi @Trikke76, at the moment we are not doing development for Zabbix 7.0. We'll run all the tests and fix all the issues against 7.0 when it is released.
I ran into this issue as well when playing around with the community.zabbix.zabbix_host module. Let me know if you would need more data for fixing this when the time comes.
Just came across this breaking change too. Anyone find a workaround? We're starting our testing in preparation for the release of Zabbix 7.0
For anyone interested, i just tested with the new RC release (7.0.0rc1) and the issue is present there as well.
@BGmot is this closed out based on your previous work?
Yes