mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Properly parse boolean env values as boolean (#51836)
This commit is contained in:
parent
4d3d8dd60f
commit
e81b74d6c8
1 changed files with 2 additions and 0 deletions
|
@ -148,6 +148,8 @@ class K8sAnsibleMixin(object):
|
|||
if auth_params.get(arg) is None:
|
||||
env_value = os.getenv('K8S_AUTH_{0}'.format(arg.upper()), None)
|
||||
if env_value is not None:
|
||||
if AUTH_ARG_SPEC[arg].get('type') == 'bool':
|
||||
env_value = env_value.lower() not in ['0', 'false', 'no']
|
||||
auth[arg] = env_value
|
||||
|
||||
def auth_set(*names):
|
||||
|
|
Loading…
Reference in a new issue