mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fix gathering facts in run_once play (#39453)
* Fix gathering facts in run_once play Fixes https://github.com/ansible/ansible/issues/39312 * Check that run_once doesn't prevent fact gathering
This commit is contained in:
parent
05d5d21d1c
commit
8ac69b0a5f
4 changed files with 43 additions and 0 deletions
|
@ -169,6 +169,9 @@ class PlayIterator:
|
|||
fact_path = self._play.fact_path
|
||||
|
||||
setup_block = Block(play=self._play)
|
||||
# Gathering facts with run_once would copy the facts from one host to
|
||||
# the others.
|
||||
setup_block.run_once = False
|
||||
setup_task = Task(block=setup_block)
|
||||
setup_task.action = 'setup'
|
||||
setup_task.name = 'Gathering Facts'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue