mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 13:53:23 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user