From 568e116a9ef5c80aef1c1a252c9e19954c4a8979 Mon Sep 17 00:00:00 2001 From: Irum Malik Date: Fri, 22 Nov 2024 21:46:21 +0000 Subject: [PATCH 1/5] helm_pull: Silence false no_log warning --- plugins/modules/helm_pull.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/helm_pull.py b/plugins/modules/helm_pull.py index 1eeb188d97..b9a3ac02b3 100644 --- a/plugins/modules/helm_pull.py +++ b/plugins/modules/helm_pull.py @@ -189,7 +189,7 @@ def main(): repo_password=dict( type="str", no_log=True, aliases=["password", "chart_repo_password"] ), - pass_credentials=dict(type="bool", default=False), + pass_credentials=dict(type="bool", default=False, no_log=True), skip_tls_certs_check=dict(type="bool", default=False), chart_devel=dict(type="bool"), untar_chart=dict(type="bool", default=False), From da28cd2c44836ddfefbcbba926ac2fb03f116c22 Mon Sep 17 00:00:00 2001 From: Irum Malik Date: Sat, 23 Nov 2024 22:31:02 +0000 Subject: [PATCH 2/5] docs: add changelog fragment --- changelogs/fragments/796-false-positive-helmull.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/796-false-positive-helmull.yaml diff --git a/changelogs/fragments/796-false-positive-helmull.yaml b/changelogs/fragments/796-false-positive-helmull.yaml new file mode 100644 index 0000000000..bda66315df --- /dev/null +++ b/changelogs/fragments/796-false-positive-helmull.yaml @@ -0,0 +1,2 @@ +bugfixes: + - helm_pull - Apply no_log=True to pass_credentials to silence false positive warning.. (https://github.com/ansible-collections/kubernetes.core/pull/796). From e24e499f7936026ccb44831507d44327e469ce50 Mon Sep 17 00:00:00 2001 From: Irum Malik Date: Sun, 24 Nov 2024 20:03:20 +0000 Subject: [PATCH 3/5] test: update helm_pull intergration to test to confirm no_log message is absent --- tests/integration/targets/helm_pull/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/targets/helm_pull/tasks/main.yml b/tests/integration/targets/helm_pull/tasks/main.yml index 1faf2be35c..c540daa1aa 100644 --- a/tests/integration/targets/helm_pull/tasks/main.yml +++ b/tests/integration/targets/helm_pull/tasks/main.yml @@ -180,6 +180,7 @@ - '"--username ansible" in _result.command' - '"--password ***" in _result.command' - '"--keyring pubring.gpg" in _result.command' + - '"Module did not set no_log for pass_credentials" not in _result.warnings' - name: Download chart using chart_ref helm_pull: From ba0221c737090b53646bb23ff93ad156331066f6 Mon Sep 17 00:00:00 2001 From: Irum Malik Date: Thu, 5 Dec 2024 08:18:19 +0000 Subject: [PATCH 4/5] test: module helm_pull returns warnings into stderr --- tests/integration/targets/helm_pull/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/helm_pull/tasks/main.yml b/tests/integration/targets/helm_pull/tasks/main.yml index c540daa1aa..0abbe507bc 100644 --- a/tests/integration/targets/helm_pull/tasks/main.yml +++ b/tests/integration/targets/helm_pull/tasks/main.yml @@ -180,7 +180,7 @@ - '"--username ansible" in _result.command' - '"--password ***" in _result.command' - '"--keyring pubring.gpg" in _result.command' - - '"Module did not set no_log for pass_credentials" not in _result.warnings' + - '"Module did not set no_log for pass_credentials" not in _result.stderr' - name: Download chart using chart_ref helm_pull: From 4e05c255473f4d7895dbed8ffcccaddbcf112b97 Mon Sep 17 00:00:00 2001 From: Mike Graves Date: Fri, 13 Dec 2024 07:14:21 -0500 Subject: [PATCH 5/5] Change no_log to false --- plugins/modules/helm_pull.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/helm_pull.py b/plugins/modules/helm_pull.py index b9a3ac02b3..943d4c513f 100644 --- a/plugins/modules/helm_pull.py +++ b/plugins/modules/helm_pull.py @@ -189,7 +189,7 @@ def main(): repo_password=dict( type="str", no_log=True, aliases=["password", "chart_repo_password"] ), - pass_credentials=dict(type="bool", default=False, no_log=True), + pass_credentials=dict(type="bool", default=False, no_log=False), skip_tls_certs_check=dict(type="bool", default=False), chart_devel=dict(type="bool"), untar_chart=dict(type="bool", default=False),