mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 00:09:14 +00:00
perf: 修改 ansible 执行
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
# from .backup.manager import AccountBackupExecutionManager
|
||||
#
|
||||
#
|
||||
from .change_password.manager import ChangePasswordManager
|
||||
|
||||
|
||||
class ExecutionManager:
|
||||
manager_type = {
|
||||
manager_type_mapper = {
|
||||
'change_password': ChangePasswordManager,
|
||||
}
|
||||
|
||||
def __init__(self, execution):
|
||||
self.execution = execution
|
||||
self._runner = self.manager_type_mapper[execution.automation.type](execution)
|
||||
|
||||
def run(self, **kwargs):
|
||||
return self._runner.run(**kwargs)
|
||||
|
||||
|
Reference in New Issue
Block a user