diff --git a/changelogs/fragments/196_kubectl.yaml b/changelogs/fragments/196_kubectl.yaml new file mode 100644 index 0000000000..9e61cf394d --- /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 5c16fe9e4f..5ca70f96cd 100644 --- a/plugins/connection/kubectl.py +++ b/plugins/connection/kubectl.py @@ -245,6 +245,8 @@ def _build_exec_cmd(self, cmd): # 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):