mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Better test for cache method availability (#54740)
* Better test for cache method availability fixes #54737 * try and ignore missing method * avoid plugin cross contamination * ammend clog
This commit is contained in:
@@ -56,5 +56,7 @@ class InventoryModule(BaseInventoryPlugin):
|
||||
raise AnsibleParserError("inventory config '{0}' could not be verified by plugin '{1}'".format(path, plugin_name))
|
||||
|
||||
plugin.parse(inventory, loader, path, cache=cache)
|
||||
if getattr(plugin, '_cache', None):
|
||||
try:
|
||||
plugin.update_cache_if_changed()
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user