From 58eec2e4c22c800f1d8a68f0345f2872ece9c6e4 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 4 Mar 2014 18:23:43 +0100 Subject: [PATCH] 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 fedfd187749654105a22be20c27e0050bc722d0a. It allows to test of the setup module has already been run even when gather_facts was explicitely disabled. --- lib/ansible/playbook/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 65965526251..332bfe55c80 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -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