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:
parent
ea138cc1fb
commit
59d5892fa3
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue