mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 12:24:43 +00:00
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.
This commit is contained in:
@@ -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
|
|||||||
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+.
|
||||||
|
|||||||
Reference in New Issue
Block a user