mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
fixed caches (#30667)
This commit is contained in:
parent
0b8e38d022
commit
2ffe3c42bb
7 changed files with 27 additions and 22 deletions
|
@ -151,9 +151,9 @@ class InventoryModule(BaseInventoryPlugin):
|
|||
self._config_data = {}
|
||||
|
||||
source_data = None
|
||||
if cache and cache_key in inventory.cache:
|
||||
if cache and cache_key in self._cache:
|
||||
try:
|
||||
source_data = inventory.cache[cache_key]
|
||||
source_data = self._cache[cache_key]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
@ -189,7 +189,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||
source_data = cloud_inventory.list_hosts(
|
||||
expand=expand_hostvars, fail_on_cloud_config=fail_on_errors)
|
||||
|
||||
inventory.cache[cache_key] = source_data
|
||||
self._cache[cache_key] = source_data
|
||||
|
||||
self._populate_from_source(source_data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue