mirror of https://github.com/jumpserver/jumpserver
perf: 优化获取当前 python 执行路径的方式
parent
b15c314384
commit
7610f64433
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue