From 3b496db4d832e22d13cc89e06d9f036b32213cc6 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Fri, 4 May 2018 18:43:33 -0500 Subject: [PATCH] Make sure that the implicit async_status gets the env from a task with async. Fixes #39699 (#39764) --- lib/ansible/executor/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 4924461f94..b487771ac1 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -713,7 +713,7 @@ class TaskExecutor: # that (with a sleep for "poll" seconds between each retry) until the # async time limit is exceeded. - async_task = Task().load(dict(action='async_status jid=%s' % async_jid)) + async_task = Task().load(dict(action='async_status jid=%s' % async_jid, environment=self._task.environment)) # FIXME: this is no longer the case, normal takes care of all, see if this can just be generalized # Because this is an async task, the action handler is async. However,