added new play_hosts var

this variable has the 'current host list' to be executed over in the
play. Useful when using --limit to not iterate over hosts not included
in play in templates or with_items.

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
Brian Coca 2014-01-25 18:43:15 -05:00
parent ea138cc1fb
commit 59d5892fa3

View file

@ -346,6 +346,8 @@ class PlayBook(object):
run_hosts=hosts run_hosts=hosts
) )
runner.module_vars.update({'play_hosts': hosts})
if task.async_seconds == 0: if task.async_seconds == 0:
results = runner.run() results = runner.run()
else: else: