ansible/ansible — pull request #9377 by craigtracey (2014-10-18 20:27:07+00:00)
Title: Implement a playbook gather_facts_force flag

Right now when executing a play that makes use of the subsets (via
--limit) or tags, facts are only gathered from the set of hosts that
will comprise the play. This is problematic when those playbooks or
their associated roles attempt to utilize facts gathered from hosts
that are not in the set.

Fact caching has recently been implemented. This would be an alternative
to gather_facts_force, but this requires key-value store solutions (ie.
redis) that might not fit into some environments. Similarly, there may
be some scenarios where the potentially stale facts are problematic.

This change allows subsets to be conditionally applied. The default case
is to apply subsets, but this may be overriden with the apply_subset
argumement to both inventory.list_hosts and inventory.get_hosts.

This is discussed here: https://groups.google.com/forum/#!topic/ansible-project/f90Y4T4SJfQ