Expose the TaskQueueManager to self
This commit is contained in:
parent
670894e2bd
commit
1d55e193c1
1 changed files with 5 additions and 5 deletions
|
@ -128,9 +128,9 @@ class AdHocCLI(CLI):
|
||||||
play = Play().load(play_ds, variable_manager=variable_manager, loader=loader)
|
play = Play().load(play_ds, variable_manager=variable_manager, loader=loader)
|
||||||
|
|
||||||
# now create a task queue manager to execute the play
|
# now create a task queue manager to execute the play
|
||||||
tqm = None
|
self._tqm = None
|
||||||
try:
|
try:
|
||||||
tqm = TaskQueueManager(
|
self._tqm = TaskQueueManager(
|
||||||
inventory=inventory,
|
inventory=inventory,
|
||||||
variable_manager=variable_manager,
|
variable_manager=variable_manager,
|
||||||
loader=loader,
|
loader=loader,
|
||||||
|
@ -139,10 +139,10 @@ class AdHocCLI(CLI):
|
||||||
passwords=passwords,
|
passwords=passwords,
|
||||||
stdout_callback='minimal',
|
stdout_callback='minimal',
|
||||||
)
|
)
|
||||||
result = tqm.run(play)
|
result = self._tqm.run(play)
|
||||||
finally:
|
finally:
|
||||||
if tqm:
|
if self._tqm:
|
||||||
tqm.cleanup()
|
self._tqm.cleanup()
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue