mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
reenabled --tree for ansible adhoc command
previous fix to avoid callbacks now conflicted with tree optoin which is implemented as a callback in 2.0
This commit is contained in:
parent
7936a4687e
commit
04d74fd680
2 changed files with 7 additions and 1 deletions
|
@ -163,9 +163,11 @@ class AdHocCLI(CLI):
|
|||
else:
|
||||
cb = 'minimal'
|
||||
|
||||
run_tree=False
|
||||
if self.options.tree:
|
||||
C.DEFAULT_CALLBACK_WHITELIST.append('tree')
|
||||
C.TREE_DIR = self.options.tree
|
||||
run_tree=True
|
||||
|
||||
# now create a task queue manager to execute the play
|
||||
self._tqm = None
|
||||
|
@ -178,6 +180,7 @@ class AdHocCLI(CLI):
|
|||
passwords=passwords,
|
||||
stdout_callback=cb,
|
||||
run_additional_callbacks=C.DEFAULT_LOAD_CALLBACK_PLUGINS,
|
||||
run_tree=run_tree,
|
||||
)
|
||||
result = self._tqm.run(play)
|
||||
finally:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue