I encountered similar issue.
Even when only enabling/disabling we need to specify a valid hostgroup for
the Zabbix instance
:
https://github.com/ansible/ansible-modules-extras/blob/devel/monitoring/zabbix_host.py#L230
Thanks.
D
Le mardi 7 juin 2016 05:32:20 UTC+8, Reece Webb a écrit :
>
> Ansible 2.1, Zabbix 3.0.3, latest zabbix-api module.
>
> I'm trying to write a playbook to update a Zabbix hosts agent interface
> IP. The host already exists, it has an agent interface (with an incorrect
> IP). It looks like my playbook is failing because a host group isn't
> specified, but I don't want to change any existing host group info (or
> anything aside from the interface IP)...
>
> Error:
> <localhost> ESTABLISH LOCAL CONNECTION FOR USER: ansible
> <localhost> EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python
> && sleep 0'
> fatal: [superrad-mz -> localhost]: FAILED! => {"changed": false, "failed":
> true, "invocation": {"module_args": {"force": true, "host_groups": null,
> "host_name": "superrad-mz", "http_login_password": null, "http_login_user":
> null, "interfaces": [{"ip": "64.54.31.174", "main": 1, "port": 10050,
> "type": 1, "useip": 1}], "inventory_mode": null, "link_templates": null,
> "login_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "login_user":
> "zabmin", "proxy": null, "server_url": "https://raddix.radiology.ucsf.edu",
> "state": "present", "status": "enabled", "timeout": 10}, "module_name":
> "zabbix_host"}, "msg": "Specify at least one group for updating host
> 'superrad-mz'."}
> ...ignoring
>
>
> Playbook:
> ---
> # file: common.yml
>
> - name: Update Host Interface IP
> ignore_errors: True
> local_action:
> module: zabbix_host
> server_url: https://raddix.radiology.ucsf.edu
> login_user: zabmin
> login_password: <password>
> host_name: "{{ ansible_hostname }}"
> interfaces:
> - type: 1
> main: 1
> ip: "{{ ansible_default_ipv4.address }}"
> port: 10050
> useip: 1
> tags:
> - interface
>
>
> Am I doing something wrong, or any ideas?
>
> Thanks,
> Reece
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6b6cc53f-e541-4c9e-b120-e307792c73a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.