Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions plugins/action/k8s_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def get_kubeconfig(self, kubeconfig, remote_transport, new_module_args):

def run(self, tmp=None, task_vars=None):
"""handler for k8s options"""
self._supports_async = True
if task_vars is None:
task_vars = dict()

Expand Down Expand Up @@ -364,7 +365,7 @@ def run(self, tmp=None, task_vars=None):
# src is on remote node
result.update(
self._execute_module(
module_name=self._task.action, task_vars=task_vars
module_name=self._task.action, task_vars=task_vars, wrap_async=self._task.async_val
)
)
return self._ensure_invocation(result)
Expand Down Expand Up @@ -396,10 +397,12 @@ def run(self, tmp=None, task_vars=None):
module_name=self._task.action,
module_args=new_module_args,
task_vars=task_vars,
wrap_async=self._task.async_val
)

# Delete tmp path
self._remove_tmp_path(self._connection._shell.tmpdir)
if not self._task.async_val:
self._remove_tmp_path(self._connection._shell.tmpdir)

result.update(module_return)

Expand Down