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:
Mike Graves
2021-06-24 12:15:27 -04:00
committed by GitHub
parent 35af8a48ad
commit 15799b2dd5
2 changed files with 4 additions and 1 deletions

View File

@@ -124,7 +124,7 @@ def get_api_client(module=None, **kwargs):
# If authorization variables aren't defined, look for them in environment variables
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)
elif arg_name in kwargs and kwargs.get(arg_name) is not None:
auth[true_name] = kwargs.get(arg_name)