mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-05 07:49:10 -07:00
Filter out internal magic and connection variables from facts returns
Fixes #15925
This commit is contained in:
parent
54caf3c5d5
commit
236c923c25
2 changed files with 32 additions and 0 deletions
|
@ -373,6 +373,7 @@ class PluginLoader:
|
|||
def all(self, *args, **kwargs):
|
||||
''' instantiates all plugins with the same arguments '''
|
||||
|
||||
path_only = kwargs.pop('path_only', False)
|
||||
class_only = kwargs.pop('class_only', False)
|
||||
all_matches = []
|
||||
found_in_cache = True
|
||||
|
@ -385,6 +386,10 @@ class PluginLoader:
|
|||
if '__init__' in name:
|
||||
continue
|
||||
|
||||
if path_only:
|
||||
yield path
|
||||
continue
|
||||
|
||||
if path not in self._module_cache:
|
||||
self._module_cache[path] = self._load_module_source(name, path)
|
||||
found_in_cache = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue