From 7610f644338d762bac526caa8a8025d87e043b60 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Tue, 14 Nov 2023 19:31:59 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BD=93=E5=89=8D=20python=20=E6=89=A7=E8=A1=8C=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/models/job.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ops/models/job.py b/apps/ops/models/job.py index 5436475ff..330bd4631 100644 --- a/apps/ops/models/job.py +++ b/apps/ops/models/job.py @@ -1,6 +1,7 @@ import json import logging import os +import sys import uuid from collections import defaultdict from datetime import timedelta @@ -77,7 +78,7 @@ class JMSPermedInventory(JMSInventory): host['login_user'] = account.username host['login_password'] = account.secret host['login_db'] = asset.spec_info.get('db_name', '') - host['ansible_python_interpreter'] = '/opt/py3/bin/python' + host['ansible_python_interpreter'] = sys.executable return host return super().make_account_vars(host, asset, account, automation, protocol, platform, gateway)