From 1c3bf95b74d1e3194213ea62daa6f2996c007a02 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:19:38 +0000 Subject: [PATCH] helm_pull: Silence false no_log warning (#796) (#857) This is a backport of PR #796 as merged into main (ecc64ca). SUMMARY Apply no_log=True to pass_credentials to silence false positive warning. Fixes similar issue to: #423 ISSUE TYPE Bugfix Pull Request COMPONENT NAME changelog/fragements/796-false-positive-helmull.yaml plugins/modules/helm_pull.py --- changelogs/fragments/796-false-positive-helmull.yaml | 2 ++ plugins/modules/helm_pull.py | 2 +- tests/integration/targets/helm_pull/tasks/main.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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 00000000..bda66315 --- /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). diff --git a/plugins/modules/helm_pull.py b/plugins/modules/helm_pull.py index 1eeb188d..943d4c51 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=False), skip_tls_certs_check=dict(type="bool", default=False), chart_devel=dict(type="bool"), untar_chart=dict(type="bool", default=False), diff --git a/tests/integration/targets/helm_pull/tasks/main.yml b/tests/integration/targets/helm_pull/tasks/main.yml index 1faf2be3..0abbe507 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.stderr' - name: Download chart using chart_ref helm_pull: