From bf79864a72f49cb7c364a4d0adb733737959a4d0 Mon Sep 17 00:00:00 2001 From: Mike Graves Date: Thu, 24 Jun 2021 11:08:56 -0400 Subject: [PATCH 1/3] 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. --- plugins/module_utils/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/module_utils/common.py b/plugins/module_utils/common.py index e3a48cca03..48e55ec044 100644 --- a/plugins/module_utils/common.py +++ b/plugins/module_utils/common.py @@ -124,7 +124,7 @@ def _raise_or_fail(exc, msg): # 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) From 31877f7901416fc06c51c6e442d7106a37a4f0db Mon Sep 17 00:00:00 2001 From: Mike Graves Date: Thu, 24 Jun 2021 11:16:16 -0400 Subject: [PATCH 2/3] Add changelog fragment --- changelogs/fragments/151-check-auth-params-for-existence.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/151-check-auth-params-for-existence.yaml diff --git a/changelogs/fragments/151-check-auth-params-for-existence.yaml b/changelogs/fragments/151-check-auth-params-for-existence.yaml new file mode 100644 index 0000000000..528f6bdebc --- /dev/null +++ b/changelogs/fragments/151-check-auth-params-for-existence.yaml @@ -0,0 +1,3 @@ +--- +bug_fixes: + - check auth params for existence, not whether they are true (https://github.com/ansible-collections/kubernetes.core/pull/151). From 44896f40dd081eedd7a58346b3ca7af53a43dd12 Mon Sep 17 00:00:00 2001 From: Mike Graves Date: Thu, 24 Jun 2021 11:22:42 -0400 Subject: [PATCH 3/3] Fix linting --- changelogs/fragments/151-check-auth-params-for-existence.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/151-check-auth-params-for-existence.yaml b/changelogs/fragments/151-check-auth-params-for-existence.yaml index 528f6bdebc..d251f08f56 100644 --- a/changelogs/fragments/151-check-auth-params-for-existence.yaml +++ b/changelogs/fragments/151-check-auth-params-for-existence.yaml @@ -1,3 +1,3 @@ --- -bug_fixes: +bugfixes: - check auth params for existence, not whether they are true (https://github.com/ansible-collections/kubernetes.core/pull/151).