remove fact namespacing

since we want to make namespaced facts drop ansible_ prefix but don't have the
time before release to perfect this feature, we are going to postpone it for now
until we have the resources to fix this issue. That way we won't have people relying
on the 'incorrect' names for a release.
This commit is contained in:
Brian Coca 2017-08-22 11:39:35 -04:00
commit 0c291ece1a
3 changed files with 3 additions and 3 deletions

View file

@ -1403,8 +1403,9 @@ NETWORK_GROUP_MODULES:
- {key: network_group_modules, section: defaults}
type: list
yaml: {key: defaults.network_group_modules}
# Deffered to 2.5
#ONLY_NAMESPACE_FACTS:
# Deffered to 2.5
# FIXME: reenable when we can remove ansible_ prefix from namespaced facts
# default: False
# description:
# - Facts normally get injected as top level variables, this setting prevents that.

View file

@ -336,6 +336,7 @@ class VariableManager:
# finally, the facts caches for this host, if it exists
try:
host_facts = wrap_var(self._fact_cache.get(host.name, {}))
# push facts to main namespace
all_vars = combine_vars(all_vars, host_facts)
except KeyError: