mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-05 14:24:48 +00:00
ansible_freeipa_module: compare_args_ipa needs to compare lists orderless
The order of lists returned by find commands is not guaranteed. Therefore lists are now converted to sets to compare them properly.
This commit is contained in:
@@ -178,7 +178,8 @@ def compare_args_ipa(module, args, ipa):
|
|||||||
if isinstance(ipa_arg, list) and not isinstance(arg, list):
|
if isinstance(ipa_arg, list) and not isinstance(arg, list):
|
||||||
arg = [arg]
|
arg = [arg]
|
||||||
# module.warn("%s <=> %s" % (arg, ipa_arg))
|
# module.warn("%s <=> %s" % (arg, ipa_arg))
|
||||||
if arg != ipa_arg:
|
if set(arg) != set(ipa_arg):
|
||||||
|
# module.warn("DIFFERENT")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user