From d43b2b54d5f6d4850bf21efa3ba96d6da07042a6 Mon Sep 17 00:00:00 2001 From: Dusan Matejka Date: Sun, 22 Jul 2018 13:19:21 +0200 Subject: [PATCH] Fixed incompatible unicode and int comparison in zabbix_host module when using proxy option (#43097) --- lib/ansible/modules/monitoring/zabbix/zabbix_host.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py index 0a6edaae6e..e93092b03f 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py @@ -396,7 +396,7 @@ class Host(object): if len(proxy_list) < 1: self._module.fail_json(msg="Proxy not found: %s" % proxy_name) else: - return proxy_list[0]['proxyid'] + return int(proxy_list[0]['proxyid']) # get group ids by group names def get_group_ids_by_group_names(self, group_names): @@ -763,7 +763,7 @@ def main(): # If proxy is not specified as a module parameter, use the existing setting if proxy is None: - proxy_id = zabbix_host_obj['proxy_hostid'] + proxy_id = int(zabbix_host_obj['proxy_hostid']) if state == "absent": # remove host