ansible_freeipa_module: Convert tuple to list in compare_args_ipa

The conversion is needed because older FreeIPA versions are returning
tuples in some cases instead of lists. To be able to compare them the
conversion to a list is needed.
This commit is contained in:
Thomas Woerner
2019-10-21 12:00:18 +02:00
parent b1a8427132
commit 8932842288

View File

@@ -183,6 +183,8 @@ def compare_args_ipa(module, args, ipa):
# If ipa_arg is a list and arg is not, replace arg
# with list containing arg. Most args in a find result
# are lists, but not all.
if isinstance(ipa_arg, tuple):
ipa_arg = list(ipa_arg)
if isinstance(ipa_arg, list) and not isinstance(arg, list):
arg = [arg]
# module.warn("%s <=> %s" % (arg, ipa_arg))