From 3e81023a879ccb883ad9aa14d5316e0fb03205d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 14 May 2016 11:07:24 +0200 Subject: [PATCH] monitoring/zabbix_host: Fix (no) proxy handling When updating a host with no proxy explicitly set, the host was always reported as changed, because it was comparing `"0"` and `None`. --- lib/ansible/modules/extras/monitoring/zabbix_host.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/monitoring/zabbix_host.py b/lib/ansible/modules/extras/monitoring/zabbix_host.py index 70d323138c4..e6fec0b0252 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_host.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_host.py @@ -362,8 +362,9 @@ class Host(object): if set(list(template_ids)) != set(exist_template_ids): return True - if host['proxy_hostid'] != proxy_id: - return True + if proxy_id is not None: + if host['proxy_hostid'] != proxy_id: + return True return False