mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 13:53:23 +00:00
Fix handling of boolean values for FreeIPA 4.9.10+
FreeIPA 4.9.10+ and 4.10 use proper mapping for boolean values, and only searching for "TRUE" does not work anymore. This patch fix ipadnszone plugin and IPAParamMapping class handling of boolean values.
This commit is contained in:
@@ -441,7 +441,11 @@ def main():
|
||||
elif (
|
||||
isinstance(value, (tuple, list)) and arg_type == "bool"
|
||||
):
|
||||
exit_args[k] = (value[0] == "TRUE")
|
||||
# FreeIPA 4.9.10+ and 4.10 use proper mapping for
|
||||
# boolean values, so we need to convert it to str
|
||||
# for comparison.
|
||||
# See: https://github.com/freeipa/freeipa/pull/6294
|
||||
exit_args[k] = (str(value[0]).upper() == "TRUE")
|
||||
else:
|
||||
if arg_type not in type_map:
|
||||
raise ValueError(
|
||||
|
||||
Reference in New Issue
Block a user