From 1cca69d33920681b1040987a4b9681216703d99d Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Mon, 28 Sep 2015 14:43:22 -0400 Subject: Added some debug when zbxapi has an issue --- roles/lib_zabbix/library/zbx_trigger.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/lib_zabbix/library/zbx_trigger.py b/roles/lib_zabbix/library/zbx_trigger.py index 8a7b29d07..21d0fcfd2 100644 --- a/roles/lib_zabbix/library/zbx_trigger.py +++ b/roles/lib_zabbix/library/zbx_trigger.py @@ -170,6 +170,10 @@ def main(): if not exists(content): # if we didn't find it, create it content = zapi.get_content(zbx_class_name, 'create', params) + + if content.has_key('error'): + module.exit_json(failed=True, changed=True, results=content['error'], state="present") + module.exit_json(changed=True, results=content['result'], state='present') ######## -- cgit v1.2.3