mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
New feature: add new meta action end_play
This feature also cleans up and extends the meta subsystem: * Allows for some meta actions (noop, clear_facts, clear_host_errors, and end_play) to operate on a per-host basis, meaning they can work with the free strategy as expected. * Allows for conditionals on meta tasks. * Fixes a bug where (for the linear strategy) metas were not treated as a run_once task, meaning every host in inventory would run the meta task. Fixes #1476
This commit is contained in:
parent
01911e4958
commit
78b8f81cab
3 changed files with 59 additions and 21 deletions
|
@ -214,7 +214,10 @@ class StrategyModule(StrategyBase):
|
|||
continue
|
||||
|
||||
if task.action == 'meta':
|
||||
self._execute_meta(task, play_context, iterator)
|
||||
# for the linear strategy, we run meta tasks just once and for
|
||||
# all hosts currently being iterated over rather than one host
|
||||
results.extend(self._execute_meta(task, play_context, iterator))
|
||||
run_once = True
|
||||
else:
|
||||
# handle step if needed, skip meta actions as they are used internally
|
||||
if self._step and choose_step:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue