From c62d9a023a6f1f93e6924f1f91073aeb60512aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Matellanes?= Date: Fri, 27 Jul 2018 06:18:02 +0200 Subject: [PATCH] Fix zabbix-template module error version comparison (#39199) * Fix zabbix-template module error version comparison * Fix zabbix-template module error version comparison --- lib/ansible/modules/monitoring/zabbix/zabbix_template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_template.py b/lib/ansible/modules/monitoring/zabbix/zabbix_template.py index cc76bc3d5d3..51ffb959b82 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_template.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_template.py @@ -417,7 +417,8 @@ class Template(object): # old api version support here api_version = self._zapi.api_version() # updateExisting for application removed from zabbix api after 3.2 - if LooseVersion(api_version) <= LooseVersion('3.2.x'): + if LooseVersion(api_version).version[:2] <= LooseVersion( + '3.2').version: update_rules['applications']['updateExisting'] = True self._zapi.configuration.import_({