diff --git a/Dockerfile-ee b/Dockerfile-ee index 3a1d240ce..ff29dd4d2 100644 --- a/Dockerfile-ee +++ b/Dockerfile-ee @@ -39,8 +39,7 @@ ARG TOOLS=" \ nmap \ telnet \ vim \ - wget \ - bubblewrap" + wget" ARG APT_MIRROR=http://mirrors.ustc.edu.cn RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \ @@ -50,4 +49,4 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \ && apt-get -y install --no-install-recommends ${TOOLS} COPY --from=build-core /opt/py3 /opt/py3 -COPY --from=build-xpack /opt/xpack /opt/jumpserver/apps/xpack +COPY --from=build-xpack /opt/xpack /opt/jumpserver/apps/xpack \ No newline at end of file diff --git a/apps/common/utils/common.py b/apps/common/utils/common.py index 86b68bef7..680e7cc1b 100644 --- a/apps/common/utils/common.py +++ b/apps/common/utils/common.py @@ -417,3 +417,7 @@ def distinct(seq, key=None): seen.add(k) result.append(item) return result + + +def is_macos(): + return platform.system() == 'Darwin' diff --git a/apps/ops/ansible/runner.py b/apps/ops/ansible/runner.py index 0ebe1d81e..d5e6c8379 100644 --- a/apps/ops/ansible/runner.py +++ b/apps/ops/ansible/runner.py @@ -5,6 +5,7 @@ import uuid from django.conf import settings from django.utils._os import safe_join +from common.utils import is_macos from .callback import DefaultCallback from .exception import CommandInBlackListException from .interface import interface @@ -104,7 +105,7 @@ class PlaybookRunner: shutil.rmtree(private_env) kwargs = dict(kwargs) - if self.isolate: + if self.isolate and not is_macos: kwargs['process_isolation'] = True kwargs['process_isolation_executable'] = 'bwrap'