1
0
mirror of https://github.com/jumpserver/jumpserver.git synced 2025-05-11 01:33:02 +00:00

perf: 添加LC_ALL环境变量C.UTF-8 解决ansible无法初始化首选语言环境问题 ()

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot 2024-01-12 11:21:27 +08:00 committed by GitHub
parent 311c01242b
commit 1275087f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ class CeleryBaseService(BaseService):
print('\n- Start Celery as Distributed Task Queue: {}'.format(self.queue.capitalize()))
ansible_config_path = os.path.join(settings.APPS_DIR, 'ops', 'ansible', 'ansible.cfg')
ansible_modules_path = os.path.join(settings.APPS_DIR, 'ops', 'ansible', 'modules')
os.environ.setdefault('LC_ALL', 'C.UTF-8')
os.environ.setdefault('PYTHONOPTIMIZE', '1')
os.environ.setdefault('ANSIBLE_FORCE_COLOR', 'True')
os.environ.setdefault('ANSIBLE_CONFIG', ansible_config_path)