mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 14:01:42 -07:00
Skip fact gathering if the entire play was included via conditional and False (#21734)
Addresses #21528
This commit is contained in:
parent
a1b3664ec4
commit
40235d7b99
3 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue