mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 04:11:25 -07: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:
|
if auth_params.get(arg) is None:
|
||||||
env_value = os.getenv('K8S_AUTH_{0}'.format(arg.upper()), None)
|
env_value = os.getenv('K8S_AUTH_{0}'.format(arg.upper()), None)
|
||||||
if env_value is not 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
|
auth[arg] = env_value
|
||||||
|
|
||||||
def auth_set(*names):
|
def auth_set(*names):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue