|
|
|
@ -559,8 +559,7 @@ class VariableManager:
|
|
|
|
if not isinstance(facts, Mapping):
|
|
|
|
if not isinstance(facts, Mapping):
|
|
|
|
raise AnsibleAssertionError("the type of 'facts' to set for host_facts should be a Mapping but is a %s" % type(facts))
|
|
|
|
raise AnsibleAssertionError("the type of 'facts' to set for host_facts should be a Mapping but is a %s" % type(facts))
|
|
|
|
|
|
|
|
|
|
|
|
# NOTE: will ignore gather_subset until we can deprecate/remove this as a return from setup.py
|
|
|
|
warn_if_reserved(facts.keys())
|
|
|
|
warn_if_reserved(facts.keys(), ignores=['gather_subset'])
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
host_cache = self._fact_cache[host]
|
|
|
|
host_cache = self._fact_cache[host]
|
|
|
|
except KeyError:
|
|
|
|
except KeyError:
|
|
|
|
@ -584,8 +583,7 @@ class VariableManager:
|
|
|
|
if not isinstance(facts, Mapping):
|
|
|
|
if not isinstance(facts, Mapping):
|
|
|
|
raise AnsibleAssertionError("the type of 'facts' to set for nonpersistent_facts should be a Mapping but is a %s" % type(facts))
|
|
|
|
raise AnsibleAssertionError("the type of 'facts' to set for nonpersistent_facts should be a Mapping but is a %s" % type(facts))
|
|
|
|
|
|
|
|
|
|
|
|
# NOTE: will ignore gather_subset until we can deprecate/remove this as a return from setup.py
|
|
|
|
warn_if_reserved(facts.keys())
|
|
|
|
warn_if_reserved(facts.keys(), ignores=['gather_subset'])
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
self._nonpersistent_fact_cache[host] |= facts
|
|
|
|
self._nonpersistent_fact_cache[host] |= facts
|
|
|
|
except KeyError:
|
|
|
|
except KeyError:
|
|
|
|
|