mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix an issue where cache plugins weren't updated
The first call to persisting facts would work due to the assignment of a MutableMapping calling __setitem__ but subsequent module fact data would not be propogated to the fact cache plugins because update() doesn't invoke __setitem__. This changes the behavior a little bit and ensures set() is called on cache plugins.
This commit is contained in:
@@ -546,7 +546,7 @@ class VariableManager:
|
||||
self._fact_cache[host.name] = facts
|
||||
else:
|
||||
try:
|
||||
self._fact_cache[host.name].update(facts)
|
||||
self._fact_cache.update(host.name, facts)
|
||||
except KeyError:
|
||||
self._fact_cache[host.name] = facts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user