mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-07-16 08:54:41 +00:00
perf: Translate docker isolation for ansible (#17033)
Co-authored-by: wangruidong <940853815@qq.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -69,9 +69,10 @@ def ensure_ansible_docker_image():
|
||||
result = safe_run_cmd(['docker', 'image', 'inspect', ANSIBLE_EE_IMAGE])
|
||||
if not result or result.returncode != 0:
|
||||
raise AnsibleDockerImageNotFound(
|
||||
_('Ansible Docker image "%(image)s" not found. '
|
||||
'You can disable this option in System Settings - Feature Settings - Job Center - '
|
||||
'Ansible Docker isolation to run locally. '
|
||||
'Please run: docker pull %(image)s')
|
||||
_('The Ansible Docker image "%(image)s" was not found. '
|
||||
'To run jobs locally instead, disable "Docker isolation for Ansible" under '
|
||||
'System Settings > Feature Settings > Job Center. '
|
||||
'To continue using the Docker execution environment, run this command on the '
|
||||
'Ansible worker: docker pull %(image)s')
|
||||
% {'image': ANSIBLE_EE_IMAGE}
|
||||
)
|
||||
|
||||
@@ -19,10 +19,10 @@ from settings.const import (
|
||||
)
|
||||
|
||||
ANSIBLE_DOCKER_HELP_TEXT = _(
|
||||
'Run Ansible jobs in Docker execution environment (%(image)s). '
|
||||
'You can disable this option in System Settings - Feature Settings - Job Center - '
|
||||
'Ansible Docker isolation to run locally. '
|
||||
'If the image is missing, pull it on the ansible worker: '
|
||||
'Run Ansible jobs in the Docker execution environment (%(image)s). '
|
||||
'To run jobs locally instead, disable "Docker isolation for Ansible" under '
|
||||
'System Settings > Feature Settings > Job Center. '
|
||||
'If the image is missing, run this command on the Ansible worker: '
|
||||
'docker pull %(image)s'
|
||||
) % {'image': ANSIBLE_EE_IMAGE}
|
||||
|
||||
@@ -215,7 +215,7 @@ class OpsSettingSerializer(serializers.Serializer):
|
||||
)
|
||||
ANSIBLE_DOCKER_ENABLED = serializers.BooleanField(
|
||||
required=False,
|
||||
label=_('Ansible Docker isolation'),
|
||||
label=_('Docker isolation for Ansible'),
|
||||
help_text=ANSIBLE_DOCKER_HELP_TEXT,
|
||||
)
|
||||
SECURITY_COMMAND_BLACKLIST = serializers.ListField(
|
||||
|
||||
Reference in New Issue
Block a user