mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Revert "Merge pull request #6250 from dagwieers/gather_facts-once"
This reverts commitb769b4181a
, reversing changes made to1e01fb856d
.
This commit is contained in:
parent
b769b4181a
commit
623cd9ac50
2 changed files with 3 additions and 6 deletions
|
@ -475,13 +475,10 @@ class PlayBook(object):
|
|||
def _do_setup_step(self, play):
|
||||
''' get facts from the remote system '''
|
||||
|
||||
host_list = self._trim_unavailable_hosts(play._play_hosts)
|
||||
if play.gather_facts is False:
|
||||
return {}
|
||||
elif play.gather_facts is None:
|
||||
host_list = [h for h in host_list if h not in self.SETUP_CACHE or 'module_setup' not in self.SETUP_CACHE[h]]
|
||||
if len(host_list) == 0:
|
||||
return {}
|
||||
|
||||
host_list = self._trim_unavailable_hosts(play._play_hosts)
|
||||
|
||||
self.callbacks.on_setup()
|
||||
self.inventory.restrict_to(host_list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue