From 23f9588732a65108ef22289e4e6704fe9fd2acf9 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 31 Aug 2020 09:29:27 +0530 Subject: [PATCH] kubectl: correct usage in console (#204) kubectl exec is printed twice in the console log. Fixes: #200 Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/200_kubectl_fix.yml | 2 ++ plugins/connection/kubectl.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/200_kubectl_fix.yml diff --git a/changelogs/fragments/200_kubectl_fix.yml b/changelogs/fragments/200_kubectl_fix.yml new file mode 100644 index 00000000..91430dc1 --- /dev/null +++ b/changelogs/fragments/200_kubectl_fix.yml @@ -0,0 +1,2 @@ +minor_changes: +- kubectl plugin - correct console log (https://github.com/ansible-collections/community.kubernetes/issues/200). diff --git a/plugins/connection/kubectl.py b/plugins/connection/kubectl.py index f3015e2e..5c16fe9e 100644 --- a/plugins/connection/kubectl.py +++ b/plugins/connection/kubectl.py @@ -228,7 +228,8 @@ class Connection(ConnectionBase): def _build_exec_cmd(self, cmd): """ Build the local kubectl exec command to run cmd on remote_host """ - local_cmd = censored_local_cmd = [self.transport_cmd] + local_cmd = [self.transport_cmd] + censored_local_cmd = [self.transport_cmd] # Build command options based on doc string doc_yaml = AnsibleLoader(self.documentation).get_single_data()