From 09ba1f38f16d78f8c0e2ffbb7e08858d76c184d4 Mon Sep 17 00:00:00 2001 From: Ruben Tsirunyan Date: Wed, 26 Dec 2018 10:59:45 +0400 Subject: [PATCH] Zabbix Action: Idempotency fix (#50297) --- lib/ansible/modules/monitoring/zabbix/zabbix_action.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_action.py b/lib/ansible/modules/monitoring/zabbix/zabbix_action.py index 7933505434b..4b26552a221 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_action.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_action.py @@ -766,12 +766,6 @@ class Action(object): parameters = convert_unicode_to_str(self._construct_parameters(**kwargs)) change_parameters = {} _diff = cleanup_data(compare_dictionaries(parameters, existing_action, change_parameters)) - if ('recovery_operations' in cleanup_data(existing_action) and - 'acknowledge_operations' not in cleanup_data(parameters)): - _diff['recovery_operations'] = [] - if ('acknowledge_operations' in cleanup_data(existing_action) and - 'acknowledge_operations' not in cleanup_data(parameters)): - _diff['acknowledge_operations'] = [] return _diff def update_action(self, **kwargs): @@ -1564,8 +1558,8 @@ def main(): conditions=dict(type='list', required=False, default=None), formula=dict(type='str', required=False, default=None), operations=dict(type='list', required=False, default=None), - recovery_operations=dict(type='list', required=False, default=None), - acknowledge_operations=dict(type='list', required=False, default=None) + recovery_operations=dict(type='list', required=False, default=[]), + acknowledge_operations=dict(type='list', required=False, default=[]) ), supports_check_mode=True )