Skip to content
Snippets Groups Projects
Commit 083396e1 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

module_utils: Export Ansible's 'boolean' parsing function.

Export Ansible's 'boolean' parsing function so it can be used to verify
if a string can be handled as a truthy value, allowing module parameters
to use strings instead of bools, as strings can be cleared by using
empty strings.
parent 8f9c344b
Branches
Tags
No related merge requests found
...@@ -30,7 +30,7 @@ __all__ = ["gssapi", "netaddr", "api", "ipalib_errors", "Env", ...@@ -30,7 +30,7 @@ __all__ = ["gssapi", "netaddr", "api", "ipalib_errors", "Env",
"kinit_password", "kinit_keytab", "run", "DN", "VERSION", "kinit_password", "kinit_keytab", "run", "DN", "VERSION",
"paths", "tasks", "get_credentials_if_valid", "Encoding", "paths", "tasks", "get_credentials_if_valid", "Encoding",
"DNSName", "getargspec", "certificate_loader", "DNSName", "getargspec", "certificate_loader",
"write_certificate_list"] "write_certificate_list", "boolean"]
import os import os
# ansible-freeipa requires locale to be C, IPA requires utf-8. # ansible-freeipa requires locale to be C, IPA requires utf-8.
...@@ -49,6 +49,7 @@ from ansible.module_utils._text import to_text ...@@ -49,6 +49,7 @@ from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import jsonify from ansible.module_utils.common.text.converters import jsonify
from ansible.module_utils import six from ansible.module_utils import six
from ansible.module_utils.common._collections_compat import Mapping from ansible.module_utils.common._collections_compat import Mapping
from ansible.module_utils.parsing.convert_bool import boolean
# Import getargspec from inspect or provide own getargspec for # Import getargspec from inspect or provide own getargspec for
# Python 2 compatibility with Python 3.11+. # Python 2 compatibility with Python 3.11+.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment