mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Skip fact gathering if the entire play was included via conditional and False (#21734)
Addresses #21528
This commit is contained in:
@@ -184,6 +184,9 @@ class PlayIterator:
|
||||
if fact_path:
|
||||
setup_task.args['fact_path'] = fact_path
|
||||
setup_task.set_loader(self._play._loader)
|
||||
# short circuit fact gathering if the entire playbook is conditional
|
||||
if self._play._included_conditional is not None:
|
||||
setup_task.when = self._play._included_conditional[:]
|
||||
setup_block.block = [setup_task]
|
||||
|
||||
setup_block = setup_block.filter_tagged_tasks(play_context, all_vars)
|
||||
|
||||
Reference in New Issue
Block a user