Backport #39764 for 2.5 - async_status environment (#39766)

* Make sure that the implicit async_status gets the env from a task with async. Fixes #39699 (#39764)

(cherry picked from commit 3b496db4d8)

* Add changelog for #39764
pull/39815/head
Matt Martz 7 years ago committed by GitHub
parent 5016ea8615
commit 4d245c9a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- async - Ensure that the implicit async_status gets the env from a task with async (https://github.com/ansible/ansible/pull/39764)

@ -703,7 +703,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,

Loading…
Cancel
Save