From 76a77aff1fc953a8ca69dfe6d1c23769cfc6d0ac Mon Sep 17 00:00:00 2001 From: abikouo <79859644+abikouo@users.noreply.github.com> Date: Wed, 4 Aug 2021 15:56:27 +0200 Subject: [PATCH] [connection plugin] add missing information from censored command (#196) [connection plugin] add missing information from censored command SUMMARY when running playbook with vvv option, the censored command display is not reflecting the execution ISSUE TYPE Bugfix Pull Request Reviewed-by: Mike Graves Reviewed-by: None --- changelogs/fragments/196_kubectl.yaml | 3 +++ plugins/connection/kubectl.py | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/196_kubectl.yaml diff --git a/changelogs/fragments/196_kubectl.yaml b/changelogs/fragments/196_kubectl.yaml new file mode 100644 index 00000000..9e61cf39 --- /dev/null +++ b/changelogs/fragments/196_kubectl.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: +- connection plugin - add arguments information into censored command (https://github.com/ansible-collections/kubernetes.core/pull/196). diff --git a/plugins/connection/kubectl.py b/plugins/connection/kubectl.py index 5c16fe9e..5ca70f96 100644 --- a/plugins/connection/kubectl.py +++ b/plugins/connection/kubectl.py @@ -245,6 +245,8 @@ class Connection(ConnectionBase): # Redact password and token from console log if key.endswith(('_token', '_password')): censored_local_cmd += [cmd_arg, '********'] + else: + censored_local_cmd += [cmd_arg, self.get_option(key)] extra_args_name = u'{0}_extra_args'.format(self.transport) if self.get_option(extra_args_name):