-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add a new template to an existing host #1413
Comments
Let me know community.zabbix collection version which you use. |
the following version : community.zabbix 3.0.4 |
Please use version 3.1.2. |
hi this is my "workaround"
could be improved by something like "when: host_infos..." to make sure we got then and for the correct host too ;) |
Hi all,
I run the following playbook to add a new template to an existing host but without success.
The playbook:
`- name: Set variables
set_fact:
zabbix_api_token: 60460362b83e4407f76863c40c60f082c375d0ddccdd220108c246f0efc26e2e
ansible_network_os: community.zabbix.zabbix
ansible_connection: httpapi
ansible_httpapi_port: 443
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: true
ansible_host: zabbix.server.ch
ansible_zabbix_url_path: monitoring
name: Set API token
set_fact:
ansible_zabbix_auth_key: "{{ zabbix_api_token }}"
name: Add template UNIFR RedHat to '{{ var_hosts }}'
community.zabbix.zabbix_host:
host_name: "{{ var_hosts }}"
link_templates:
- "UNIFR RedHat"
delegate_to: localhost`
My error :
"msg": "connection error occurred: REST API returned {'code': -32602, 'message': 'Invalid params.', 'data': 'Incorrect arguments passed to function.'} when sending {\"jsonrpc\": \"2.0\", \"method\": \"host.update\", \"id\": \"8a7590a9-dfd8-4eda-8ea9-14a7e3f51744\", \"params\": {\"hostid\": \"10667\", \"groups\": [{\"groupid\": \"2\"}], \"status\": 0, \"monitored_by\": 0, \"interfaces\": [{\"main\": 1, \"useip\": 1, \"ip\": \"134.21.83.154\", \"dns\": \"\", \"port\": \"10050\", \"interfaceid\": \"97\", \"hostid\": \"10667\", \"type\": 1, \"available\": \"1\", \"error\": \"\", \"errors_from\": \"0\", \"disable_until\": \"0\", \"details\": {\"version\": 2, \"bulk\": 1, \"community\": \"\", \"securityname\": \"\", \"contextname\": \"\", \"securitylevel\": 0, \"authprotocol\": 0, \"authpassphrase\": \"\", \"privprotocol\": 0, \"privpassphrase\": \"\"}}]}, \"auth\": \"60460362b83e4407f76863c40c60f082c375d0ddccdd220108c246f0efc26e2e\"}",
What is wrong ?
I need help.
Regards
Olivier
The text was updated successfully, but these errors were encountered: