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:
Thomas Woerner
2019-10-09 11:52:39 +02:00
parent bc0f211c29
commit 57188c890a

View File

@@ -178,7 +178,8 @@ def compare_args_ipa(module, args, ipa):
if isinstance(ipa_arg, list) and not isinstance(arg, list):
arg = [arg]
# module.warn("%s <=> %s" % (arg, ipa_arg))
if arg != ipa_arg:
if set(arg) != set(ipa_arg):
# module.warn("DIFFERENT")
return False
return True