change host.delete() parameter for newer ZBX api.

As of Zabbix API 2.4, host.delete() will not takes parameter with
`hostid` property but only the array of it.
https://www.zabbix.com/documentation/2.2/manual/api/reference/host/delete

fix #1800
reviewable/pr18780/r1
t.goto 9 years ago
parent b51efc51bc
commit f46e193718

@ -240,7 +240,7 @@ class Host(object):
try:
if self._module.check_mode:
self._module.exit_json(changed=True)
self._zapi.host.delete({'hostid': host_id})
self._zapi.host.delete([host_id])
except Exception, e:
self._module.fail_json(msg="Failed to delete host %s: %s" % (host_name, e))
@ -505,4 +505,3 @@ def main():
from ansible.module_utils.basic import *
main()

Loading…
Cancel
Save