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:
Rafael Guterres Jeffman
2022-06-29 18:54:04 -03:00
parent 2fa4aa60b1
commit c8d5cb7ee2
6 changed files with 46 additions and 13 deletions

View File

@@ -845,7 +845,10 @@ else:
# Check if param_name is actually a param
if param_name in self.ansible_module.params:
value = self.ansible_module.params_get(param_name)
if isinstance(value, bool):
if (
self.ansible_module.ipa_check_version("<", "4.9.10")
and isinstance(value, bool)
):
value = "TRUE" if value else "FALSE"
# Since param wasn't a param check if it's a method name