[Question]Ansible docker 隔离开启,测试资产连接报错main.yml could not be found
Author: bytenameCreated Aug 13, 2026Updated Sep 11, 2026
Labels⏳ Pending feedback🤔 Question
Product Version
4.10.18
Product Edition
- Community Edition
- Enterprise Edition
- Enterprise Trial Edition
Installation Method
- Online Installation (One-click command installation)
- Offline Package Installation
- All-in-One
- 1Panel
- Kubernetes
- Source Code
Environment Information
- OS: Ubuntu (docker-compose 部署)
- JumpServer: v4.10.18-ce
- ansible-executor image: jumpserver/ansible-executor:latest (build_date=20260728, image_id=0fa4b90e9809)
- Python: 3.14 (core/celery 容器内)
- Ansible: 2.16.18
- Deployment: /opt/jumpserver-installer-v4.10.18/compose
Question Description
Ansible Docker 隔离模式下,executor 容器起来 660ms 内就退出(exitCode=1),报错 main.yml could not be found。
从 v4.10.17 升级到 v4.10.18(release note 提到 "Restored file transfers in Docker isolation mode"),问题依旧存在。
排查过程
- 现象
任务日志:
2026-08-13 17:26:39 >>> 任务准备阶段 2026-08-13 17:26:39 >>> 开始执行任务 2026-08-13 17:26:40 ERROR! the playbook: main.yml could not be found
docker events 抓到 executor 容器生命周期(执行时间 < 1 秒):
17:29:30.721 create ansible_runner_90336d90-e6de-4e56-84c0-c871372f0b1a 17:29:30.931 start 17:29:31.394 die (exitCode=1) 17:29:31.403 destroy (容器自动清理, --rm 模式)
Expected Behavior
开启 Ansible Docker 隔离后,点击"测试资产连接"应该:
- Celery 通过 docker socket 启动 ansible-executor 容器
- 容器内 mount 的 project 目录能正确读到 main.yml
- ansible-playbook 正常执行 ping 测试
- Web 上返回连接成功/失败结果
Additional Information
No response
Source: jumpserver/jumpserver