mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
pushed module_loader to task_queue_manager so all cli's can benefit from it
also normalized -M option across all cli fixes #12016
This commit is contained in:
@@ -31,7 +31,7 @@ from ansible.executor.process.worker import WorkerProcess
|
||||
from ansible.executor.process.result import ResultProcess
|
||||
from ansible.executor.stats import AggregateStats
|
||||
from ansible.playbook.play_context import PlayContext
|
||||
from ansible.plugins import callback_loader, strategy_loader
|
||||
from ansible.plugins import callback_loader, strategy_loader, module_loader
|
||||
from ansible.template import Templar
|
||||
|
||||
__all__ = ['TaskQueueManager']
|
||||
@@ -62,6 +62,12 @@ class TaskQueueManager:
|
||||
self._callbacks_loaded = False
|
||||
self._callback_plugins = []
|
||||
|
||||
# make sure the module path (if specified) is parsed and
|
||||
# added to the module_loader object
|
||||
if options.module_path is not None:
|
||||
for path in options.module_path.split(os.pathsep):
|
||||
module_loader.add_directory(path)
|
||||
|
||||
# a special flag to help us exit cleanly
|
||||
self._terminated = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user