mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
parent
3e44186137
commit
0d0bdbec62
1 changed files with 8 additions and 3 deletions
|
@ -348,9 +348,6 @@ class PluginLoader:
|
||||||
|
|
||||||
def _update_object(self, obj, name, path):
|
def _update_object(self, obj, name, path):
|
||||||
|
|
||||||
# load plugin config data
|
|
||||||
self._load_config_defs(name, path)
|
|
||||||
|
|
||||||
# set extra info on the module, in case we want it later
|
# set extra info on the module, in case we want it later
|
||||||
setattr(obj, '_original_path', path)
|
setattr(obj, '_original_path', path)
|
||||||
setattr(obj, '_load_name', name)
|
setattr(obj, '_load_name', name)
|
||||||
|
@ -394,6 +391,10 @@ class PluginLoader:
|
||||||
return None
|
return None
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
# load plugin config data
|
||||||
|
if not found_in_cache:
|
||||||
|
self._load_config_defs(name, path)
|
||||||
|
|
||||||
self._update_object(obj, name, path)
|
self._update_object(obj, name, path)
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
@ -467,6 +468,10 @@ class PluginLoader:
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
display.warning("Skipping plugin (%s) as it seems to be incomplete: %s" % (path, to_text(e)))
|
display.warning("Skipping plugin (%s) as it seems to be incomplete: %s" % (path, to_text(e)))
|
||||||
|
|
||||||
|
# load plugin config data
|
||||||
|
if not found_in_cache:
|
||||||
|
self._load_config_defs(name, path)
|
||||||
|
|
||||||
self._update_object(obj, name, path)
|
self._update_object(obj, name, path)
|
||||||
yield obj
|
yield obj
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue