From 05830658bc9593a4083fd4b3ffc42fab0318c5d4 Mon Sep 17 00:00:00 2001 From: jctanner Date: Thu, 26 Apr 2018 14:17:16 -0400 Subject: [PATCH] task_executor send the task as a kwarg to connections (#39341) * make taskexecutor send the task as a kwarg to connections * Fix line length error * Send just the task uuid --- lib/ansible/executor/task_executor.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index ab6915dee6f..13b7d24bc96 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -794,7 +794,14 @@ class TaskExecutor: conn_type = self._play_context.connection - connection = self._shared_loader_obj.connection_loader.get(conn_type, self._play_context, self._new_stdin, ansible_playbook_pid=to_text(os.getppid())) + connection = self._shared_loader_obj.connection_loader.get( + conn_type, + self._play_context, + self._new_stdin, + task_uuid=self._task._uuid, + ansible_playbook_pid=to_text(os.getppid()) + ) + if not connection: raise AnsibleError("the connection plugin '%s' was not found" % conn_type)