mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-05 11:06:34 +00:00
[Update] 修改执行task时切换root组织
This commit is contained in:
parent
ffce909ee3
commit
00d9f71384
@ -33,7 +33,8 @@ def run_ansible_task(tid, callback=None, **kwargs):
|
|||||||
:param callback: callback function name
|
:param callback: callback function name
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
task = get_object_or_none(Task, id=tid)
|
with tmp_to_root_org():
|
||||||
|
task = get_object_or_none(Task, id=tid)
|
||||||
if task:
|
if task:
|
||||||
result = task.run()
|
result = task.run()
|
||||||
if callback is not None:
|
if callback is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user