Browse Source

[Update] 修改执行task时切换root组织

pull/3789/head
Bai 5 years ago
parent
commit
00d9f71384
  1. 3
      apps/ops/tasks.py

3
apps/ops/tasks.py

@ -33,7 +33,8 @@ def run_ansible_task(tid, callback=None, **kwargs):
:param callback: callback function name
:return:
"""
task = get_object_or_none(Task, id=tid)
with tmp_to_root_org():
task = get_object_or_none(Task, id=tid)
if task:
result = task.run()
if callback is not None:

Loading…
Cancel
Save