mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-25 06:42:49 +00:00
perf: 优化获取当前 python 执行路径的方式
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user