mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-25 23:00:57 +00:00
perf: 优化获取当前 python 执行路径的方式
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
@@ -77,7 +78,7 @@ class JMSPermedInventory(JMSInventory):
|
|||||||
host['login_user'] = account.username
|
host['login_user'] = account.username
|
||||||
host['login_password'] = account.secret
|
host['login_password'] = account.secret
|
||||||
host['login_db'] = asset.spec_info.get('db_name', '')
|
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 host
|
||||||
return super().make_account_vars(host, asset, account, automation, protocol, platform, gateway)
|
return super().make_account_vars(host, asset, account, automation, protocol, platform, gateway)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user