[stable-2.9] Optionally support task_uuid if passed from newer modules (#68556)

* Optionally support task_uuid if passed from newer modules

* Add changelog
pull/68831/head
Nathaniel Case 5 years ago committed by GitHub
parent 8a14392a29
commit f75e1698f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- Alter task_executor's start_connection to support newer modules from
collections which expect to send task UUID.

@ -1049,7 +1049,7 @@ class TaskExecutor:
return handler return handler
def start_connection(play_context, variables): def start_connection(play_context, variables, task_uuid=None):
''' '''
Starts the persistent connection Starts the persistent connection
''' '''
@ -1080,7 +1080,7 @@ def start_connection(play_context, variables):
python = sys.executable python = sys.executable
master, slave = pty.openpty() master, slave = pty.openpty()
p = subprocess.Popen( p = subprocess.Popen(
[python, ansible_connection, to_text(os.getppid())], [python, ansible_connection, to_text(os.getppid()), to_text(task_uuid)],
stdin=slave, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env stdin=slave, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env
) )
os.close(slave) os.close(slave)

Loading…
Cancel
Save