mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Populate module_setup from the setup module rather than special code elsewhere
This small change allows for individual setup actions to populate the SETUP_CACHE and not cause a subsequent facts-gathering when not needed. This follows the standard of other facts modules as laid out in #1206 and implemented in fedfd18774
. It allows to test of the setup module has already been run even when gather_facts was explicitely disabled.
This commit is contained in:
parent
2b2b174fd3
commit
58eec2e4c2
1 changed files with 0 additions and 1 deletions
|
@ -525,7 +525,6 @@ class PlayBook(object):
|
||||||
# let runner template out future commands
|
# let runner template out future commands
|
||||||
setup_ok = setup_results.get('contacted', {})
|
setup_ok = setup_results.get('contacted', {})
|
||||||
for (host, result) in setup_ok.iteritems():
|
for (host, result) in setup_ok.iteritems():
|
||||||
self.SETUP_CACHE[host].update({'module_setup': True})
|
|
||||||
self.SETUP_CACHE[host].update(result.get('ansible_facts', {}))
|
self.SETUP_CACHE[host].update(result.get('ansible_facts', {}))
|
||||||
return setup_results
|
return setup_results
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue