Mark vars from facts cache as unsafe (fixes #42656) (#42682)

Facts are marked as unsafe when originally gathered, but they lose that
marking when they are serialized to JSON and parsed back out.
This commit is contained in:
Andrew Gaffney 2018-07-13 11:15:03 -05:00 committed by GitHub
commit e4af3a8957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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