- Dockerfile 增加 COPY ansible/ansible.cfg、ansible/hosts 到 /etc/ansible/ - ansible/ansible.cfg 改为裁剪后的实用配置:整份默认配置已移到 ansible.default/ 作参考,镜像内只保留日常运维会调的项 - 修正 ini 不支持行尾注释导致的 DEFAULT_TIMEOUT 解析报错, 注释统一移到配置项上一行 - 保留 gather_subset 以加速事实收集,并关闭 deprecation_warnings 静默其 2.16 弃用告警
14 lines
466 B
Docker
14 lines
466 B
Docker
FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-python315
|
|
LABEL MAINTAINER="tianjun@odboy.cn"
|
|
ENV TimeZone=Asia/Shanghai
|
|
WORKDIR /home/admin
|
|
|
|
# 锁定 ansible-core 版本,避免 EPEL 仓库升级后构建结果漂移;版本不可用会让构建直接失败
|
|
RUN set -e && yum install -y \
|
|
epel-release \
|
|
ansible-core-2.16.3; \
|
|
ansible --version
|
|
|
|
COPY ./ansible/ansible.cfg /etc/ansible/ansible.cfg
|
|
COPY ./ansible/hosts /etc/ansible/hosts
|