mirror of https://github.com/jumpserver/jumpserver
[Update] 修改执行task时切换root组织
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