File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -343,20 +343,16 @@ def _ensure_module_available(self) -> None:
343
343
if not Runtime .initialized :
344
344
col_path = [f"{ self .cache_dir } /collections" ]
345
345
# noinspection PyProtectedMember
346
+ # pylint: disable=import-outside-toplevel,no-name-in-module
347
+ from ansible .plugins .loader import init_plugin_loader
346
348
from ansible .utils .collection_loader ._collection_finder import ( # pylint: disable=import-outside-toplevel
347
349
_AnsibleCollectionFinder , # noqa: PLC2701
348
350
)
349
351
350
- # noinspection PyProtectedMember
351
- # pylint: disable=protected-access
352
- col_path += self .config .collections_paths
353
- col_path += os .path .dirname ( # noqa: PTH120
354
- os .environ .get (ansible_collections_path (), "." ),
355
- ).split (":" )
356
352
_AnsibleCollectionFinder ( # noqa: SLF001
357
353
paths = col_path ,
358
- )._install () # pylint: disable=protected-access
359
- Runtime . initialized = True
354
+ )._remove () # pylint: disable=protected-access
355
+ init_plugin_loader ( col_path )
360
356
361
357
def clean (self ) -> None :
362
358
"""Remove content of cache_dir."""
You can’t perform that action at this time.
0 commit comments