mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-21 11:34:15 -07:00
Fix inventory cache interface (#50446)
* Replace InventoryFileCacheModule with a better developer-interface Use new interface for inventory plugins with backwards compatibility Auto-update the backing cache-plugin if the cache has changed after parsing the inventory plugin * Update CacheModules to use the config system and add a deprecation warning if they are being imported directly rather than using cache_loader * Fix foreman inventory caching * Add tests * Add integration test to check that fact caching works normally with cache plugins using ansible.constants and inventory caching provides a helpful error for non-compatible cache plugins * Add some developer documentation for inventory and cache plugins * Add user documentation for inventory caching * Add deprecation docs * Apply suggestions from docs review * Add changelog
This commit is contained in:
parent
831f068f98
commit
9687879840
24 changed files with 831 additions and 86 deletions
9
changelogs/fragments/restructure_inventory_cache.yaml
Normal file
9
changelogs/fragments/restructure_inventory_cache.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
minor_changes:
|
||||
- inventory plugins - Inventory plugins that support caching can now use any cache plugin
|
||||
shipped with Ansible.
|
||||
deprecated_features:
|
||||
- inventory plugins - Inventory plugins using self.cache is deprecated and will be removed
|
||||
in 2.12. Inventory plugins should use self._cache as a dictionary to store results.
|
||||
- cache plugins - Importing cache plugins directly is deprecated and will be removed in 2.12.
|
||||
Cache plugins should use the cache_loader instead so cache options can be reconciled via
|
||||
the configuration system rather than constants.
|
Loading…
Add table
Add a link
Reference in a new issue