diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 4b7705d3d0d..9b19c59ac9f 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -356,6 +356,8 @@ class PlayBook(object): no_log=task.no_log, ) + runner.module_vars.update({'play_hosts': hosts}) + if task.async_seconds == 0: results = runner.run() else: