Store the list of hosts to run on in runner object

This reduces the number of times inventory.list_hosts is called, which
can be costly. When coming from a playbook that data is already known.
This commit is contained in:
Jesse Keating 2014-01-06 20:13:39 -08:00
commit 6013f0738e
2 changed files with 11 additions and 3 deletions

View file

@ -316,7 +316,8 @@ class PlayBook(object):
check=self.check, diff=self.diff, environment=task.environment, complex_args=task.args,
accelerate=task.play.accelerate, accelerate_port=task.play.accelerate_port,
accelerate_ipv6=task.play.accelerate_ipv6,
error_on_undefined_vars=C.DEFAULT_UNDEFINED_VAR_BEHAVIOR
error_on_undefined_vars=C.DEFAULT_UNDEFINED_VAR_BEHAVIOR,
run_hosts=hosts
)
if task.async_seconds == 0: