From 25e21b185f628e77984ad03b44786e5c9d25ed66 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 23 Apr 2024 14:56:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=20R?= =?UTF-8?q?ECEPTOR=5FENABLED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/conf.py | 2 +- apps/jumpserver/settings/custom.py | 2 +- apps/ops/ansible/interface.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index ede8a8035..d2d491545 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -617,7 +617,7 @@ class Config(dict): 'TICKET_APPLY_ASSET_SCOPE': 'all', # Ansible Receptor - 'ANSIBLE_RECEPTOR_ENABLED': True, + 'RECEPTOR_ENABLED': True, 'ANSIBLE_RECEPTOR_GATEWAY_PROXY_HOST': 'jms_celery', 'ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS': 'receptor:7521' diff --git a/apps/jumpserver/settings/custom.py b/apps/jumpserver/settings/custom.py index 5a4418270..b116d5223 100644 --- a/apps/jumpserver/settings/custom.py +++ b/apps/jumpserver/settings/custom.py @@ -232,6 +232,6 @@ FILE_UPLOAD_SIZE_LIMIT_MB = CONFIG.FILE_UPLOAD_SIZE_LIMIT_MB TICKET_APPLY_ASSET_SCOPE = CONFIG.TICKET_APPLY_ASSET_SCOPE # Ansible Receptor -ANSIBLE_RECEPTOR_ENABLED = CONFIG.ANSIBLE_RECEPTOR_ENABLED +RECEPTOR_ENABLED = CONFIG.RECEPTOR_ENABLED ANSIBLE_RECEPTOR_GATEWAY_PROXY_HOST = CONFIG.ANSIBLE_RECEPTOR_GATEWAY_PROXY_HOST ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS = CONFIG.ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS diff --git a/apps/ops/ansible/interface.py b/apps/ops/ansible/interface.py index 065e80abc..a11df97c7 100644 --- a/apps/ops/ansible/interface.py +++ b/apps/ops/ansible/interface.py @@ -15,7 +15,7 @@ class _LazyRunnerInterface(LazyObject): @staticmethod def make_interface(): runner_type = AnsibleReceptorRunner \ - if settings.ANSIBLE_RECEPTOR_ENABLED else AnsibleNativeRunner + if settings.RECEPTOR_ENABLED else AnsibleNativeRunner gateway_host = settings.ANSIBLE_RECEPTOR_GATEWAY_PROXY_HOST \ if settings.ANSIBLE_RECEPTOR_GATEWAY_PROXY_HOST else '127.0.0.1' return RunnerInterface(runner_type=runner_type, gateway_proxy_host=gateway_host)