[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 <mgraves@redhat.com>
Reviewed-by: None <None>
This commit is contained in:
abikouo
2021-08-04 15:56:27 +02:00
committed by GitHub
parent 25590804cb
commit 76a77aff1f
2 changed files with 5 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
---
bugfixes:
- connection plugin - add arguments information into censored command (https://github.com/ansible-collections/kubernetes.core/pull/196).

View File

@@ -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):