|
|
@ -348,6 +348,7 @@ except ImportError:
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
|
|
|
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
|
|
|
from ansible.module_utils.six import integer_types
|
|
|
|
from ansible.module_utils.six import integer_types
|
|
|
|
|
|
|
|
from ansible.module_utils._text import to_native
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def validate_rule(self, rule, rule_type=None):
|
|
|
|
def validate_rule(self, rule, rule_type=None):
|
|
|
@ -386,6 +387,11 @@ def compare_rules_change(old_list, new_list, purge_list):
|
|
|
|
new_list.append(old_rule)
|
|
|
|
new_list.append(old_rule)
|
|
|
|
else: # one rule is removed
|
|
|
|
else: # one rule is removed
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
|
|
|
|
|
# Compare new list and old list is the same? here only compare names
|
|
|
|
|
|
|
|
if not changed:
|
|
|
|
|
|
|
|
new_names = [to_native(x['name']) for x in new_list]
|
|
|
|
|
|
|
|
old_names = [to_native(x['name']) for x in old_list]
|
|
|
|
|
|
|
|
changed = (set(new_names) != set(old_names))
|
|
|
|
return changed, new_list
|
|
|
|
return changed, new_list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|