community.zabbix.zabbix_host module will send group id and name but only id is allowed in zabbix 7
Trikke76 opened this issue · comments
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\"}"}