Commit 58eec2e4 by Dag Wieers Committed by Michael DeHaan

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 fedfd187. It allows to test of the setup module has already been run even when gather_facts was explicitely disabled.
parent 2b2b174f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment