|
|
@ -26,7 +26,10 @@ short_description: Zabbix host creates/updates/deletes
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- This module allows you to create, modify and delete Zabbix host entries and associated group and template data.
|
|
|
|
- This module allows you to create, modify and delete Zabbix host entries and associated group and template data.
|
|
|
|
version_added: "2.0"
|
|
|
|
version_added: "2.0"
|
|
|
|
author: Tony Minfei Ding, Harrison Gu
|
|
|
|
author:
|
|
|
|
|
|
|
|
- "(@cove)"
|
|
|
|
|
|
|
|
- "Tony Minfei Ding"
|
|
|
|
|
|
|
|
- "Harrison Gu (@harrisongu)"
|
|
|
|
requirements:
|
|
|
|
requirements:
|
|
|
|
- "python >= 2.6"
|
|
|
|
- "python >= 2.6"
|
|
|
|
- zabbix-api
|
|
|
|
- zabbix-api
|
|
|
@ -237,7 +240,7 @@ class Host(object):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if self._module.check_mode:
|
|
|
|
if self._module.check_mode:
|
|
|
|
self._module.exit_json(changed=True)
|
|
|
|
self._module.exit_json(changed=True)
|
|
|
|
self._zapi.host.delete({'hostid': host_id})
|
|
|
|
self._zapi.host.delete([host_id])
|
|
|
|
except Exception, e:
|
|
|
|
except Exception, e:
|
|
|
|
self._module.fail_json(msg="Failed to delete host %s: %s" % (host_name, e))
|
|
|
|
self._module.fail_json(msg="Failed to delete host %s: %s" % (host_name, e))
|
|
|
|
|
|
|
|
|
|
|
@ -502,4 +505,3 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.module_utils.basic import *
|
|
|
|
from ansible.module_utils.basic import *
|
|
|
|
main()
|
|
|
|
main()
|
|
|
|
|
|
|
|
|
|
|
|