mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07: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:
parent
d2c948dd6a
commit
154754ae50
7 changed files with 17 additions and 15 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue