summaryrefslogtreecommitdiff
path: root/monitoring
diff options
context:
space:
mode:
authorBrian Coca <bcoca@ansible.com>2016-03-03 18:37:42 -0500
committerBrian Coca <bcoca@ansible.com>2016-03-03 18:37:42 -0500
commit904b5938a031614ba8239ba2918e5839b9ad5d88 (patch)
tree5e5e3af48010c980c149b18416b102ef436517b0 /monitoring
parentf23baa2ddac50db9c50fe8227a8e7582a5cb4ee7 (diff)
parent2a750bb8db9b79bb073d90c297b21aacf3cf8e85 (diff)
downloadansible-modules-extras-904b5938a031614ba8239ba2918e5839b9ad5d88.tar.gz
Merge pull request #706 from eikef/devel
return as unchanged if macro update is unnecessary
Diffstat (limited to 'monitoring')
-rw-r--r--monitoring/zabbix_hostmacro.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/monitoring/zabbix_hostmacro.py b/monitoring/zabbix_hostmacro.py
index 7895d885..b9a9ec4a 100644
--- a/monitoring/zabbix_hostmacro.py
+++ b/monitoring/zabbix_hostmacro.py
@@ -149,6 +149,8 @@ class HostMacro(object):
# update host macro
def update_host_macro(self, host_macro_obj, macro_name, macro_value):
host_macro_id = host_macro_obj['hostmacroid']
+ if host_macro_obj['macro'] == '{$'+macro_name+'}' and host_macro_obj['value'] == macro_value:
+ self._module.exit_json(changed=False, result="Host macro %s already up to date" % macro_name)
try:
if self._module.check_mode:
self._module.exit_json(changed=True)