mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-29 10:54:41 +00:00
Check that auth value is not None (#151)
* Check that auth value is not None The previous check for truth prevented the verify_ssl param from being set to false, thus forcing ssl verfication in every case. * Add changelog fragment * Fix linting
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- check auth params for existence, not whether they are true (https://github.com/ansible-collections/kubernetes.core/pull/151).
|
||||||
@@ -124,7 +124,7 @@ def get_api_client(module=None, **kwargs):
|
|||||||
|
|
||||||
# If authorization variables aren't defined, look for them in environment variables
|
# If authorization variables aren't defined, look for them in environment variables
|
||||||
for true_name, arg_name in AUTH_ARG_MAP.items():
|
for true_name, arg_name in AUTH_ARG_MAP.items():
|
||||||
if module and module.params.get(arg_name):
|
if module and module.params.get(arg_name) is not None:
|
||||||
auth[true_name] = module.params.get(arg_name)
|
auth[true_name] = module.params.get(arg_name)
|
||||||
elif arg_name in kwargs and kwargs.get(arg_name) is not None:
|
elif arg_name in kwargs and kwargs.get(arg_name) is not None:
|
||||||
auth[true_name] = kwargs.get(arg_name)
|
auth[true_name] = kwargs.get(arg_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user