feat: ansible 镜像内置自定义 ansible.cfg 与 hosts 清单

- Dockerfile 增加 COPY ansible/ansible.cfg、ansible/hosts 到 /etc/ansible/
- ansible/ansible.cfg 改为裁剪后的实用配置:整份默认配置已移到
  ansible.default/ 作参考,镜像内只保留日常运维会调的项
- 修正 ini 不支持行尾注释导致的 DEFAULT_TIMEOUT 解析报错,
  注释统一移到配置项上一行
- 保留 gather_subset 以加速事实收集,并关闭 deprecation_warnings
  静默其 2.16 弃用告警
This commit is contained in:
2026-05-16 21:37:47 +08:00
parent 3a36734faf
commit 208e1ed1a7
2 changed files with 90 additions and 960 deletions
+3
View File
@@ -8,3 +8,6 @@ RUN set -e && yum install -y \
epel-release \ epel-release \
ansible-core-2.16.3; \ ansible-core-2.16.3; \
ansible --version ansible --version
COPY ./ansible/ansible.cfg /etc/ansible/ansible.cfg
COPY ./ansible/hosts /etc/ansible/hosts
File diff suppressed because it is too large Load Diff