Skip to content

Commit

Permalink
task_executor send the task as a kwarg to connections (ansible#39341)
Browse files Browse the repository at this point in the history
* make taskexecutor send the task as a kwarg to connections

* Fix line length error

* Send just the task uuid
  • Loading branch information
jctanner authored Apr 26, 2018
1 parent bdb75cd commit 0583065
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/ansible/executor/task_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,14 @@ def _get_connection(self, variables, templar):

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)

Expand Down

0 comments on commit 0583065

Please sign in to comment.