mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Consolidate boolean/mk_boolean conversion functions into a single location
Consolidate the module_utils, constants, and config functions that convert values into booleans into a single function in module_utils. Port code to use the module_utils.validate.convert_bool.boolean function isntead of mk_boolean.
This commit is contained in:
parent
f9c60e1a82
commit
ff22528b07
30 changed files with 433 additions and 102 deletions
|
@ -17,9 +17,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.constants import mk_boolean as boolean
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.parsing.convert_bool import boolean
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.listify import listify_lookup_plugin_terms
|
||||
|
||||
|
@ -72,7 +72,7 @@ class LookupModule(LookupBase):
|
|||
# this particular item is to be skipped
|
||||
continue
|
||||
|
||||
skip_missing = boolean(flags.get('skip_missing', False))
|
||||
skip_missing = boolean(flags.get('skip_missing', False), strict=False)
|
||||
subvalue = item0
|
||||
lastsubkey = False
|
||||
sublist = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue