diff --git a/examples/ansible.cfg b/examples/ansible.cfg index 1a592d3e355..4312ec9d824 100644 --- a/examples/ansible.cfg +++ b/examples/ansible.cfg @@ -24,9 +24,11 @@ transport = smart remote_port = 22 module_lang = C -# controls implicit fact gathering (always, never or smart). -# smart gathers only if not currently in memory. -# does NOT affect explicit 'gather_facts' entries. +# This setting controls implicit fact gathering, valid values are +# implicit, explicit or smart (default). +# smart gathers only if facts for that host are not currently in memory. +# implicit set the default of gather_facts to True, explicit sets it +# to False. This does NOT affect explicit 'gather_facts' entries. gathering = smart # additional paths to search for roles in, colon separated diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 88e054c3c8f..88dd0f5f4bc 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -485,7 +485,7 @@ class PlayBook(object): 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 {} - elif play.gather_facts is False or (play.gather_facts is None and C.DEFAULT_GATHERING == 'never'): + elif play.gather_facts is False or (play.gather_facts is None and C.DEFAULT_GATHERING == 'explicit'): return {} self.callbacks.on_setup()