diff --git a/apps/ops/ansible/runner.py b/apps/ops/ansible/runner.py index e0e1e7a9e..3fda4e72f 100644 --- a/apps/ops/ansible/runner.py +++ b/apps/ops/ansible/runner.py @@ -26,6 +26,7 @@ def docker_isolation_kwargs(): 'process_isolation': True, 'process_isolation_executable': 'docker', 'container_image': ANSIBLE_EE_IMAGE, + 'container_options': ['--network=host'], } diff --git a/utils/ansible_executor/execution-environment.yml b/utils/ansible_executor/execution-environment.yml index 37c48ed2f..06169dfbd 100644 --- a/utils/ansible_executor/execution-environment.yml +++ b/utils/ansible_executor/execution-environment.yml @@ -62,4 +62,3 @@ additional_build_steps: - ENV LANG=C.UTF-8 # bindep [compile] 已避免工具链进入最终层;此处仅清理 PKGMGR_PRESERVE_CACHE 写入的 dnf 缓存 - RUN $PKGMGR clean all && rm -rf /var/cache/dnf /var/cache/yum /root/.cache - - RUN pip cache purge