1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02: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:
Dag Wieers 2014-03-04 18:23:43 +01:00 committed by Michael DeHaan
parent 2b2b174fd3
commit 58eec2e4c2

View file

@ -525,7 +525,6 @@ class PlayBook(object):
# let runner template out future commands
setup_ok = setup_results.get('contacted', {})
for (host, result) in setup_ok.iteritems():
self.SETUP_CACHE[host].update({'module_setup': True})
self.SETUP_CACHE[host].update(result.get('ansible_facts', {}))
return setup_results