ansible-core (newest patch of each line) + ansible-lint + collections in a venv, for COPY --from
9.2K
epicmorg/ansibleOne image per ansible-core line (2.11 … 2.21), each at the newest patch release of that line
(folder = major.minor, image = major.minor.patch, also tagged), on the newest Python that line supports as a
controller, from epicmorg/python:
| ansible-core | Python | ansible-lint |
|---|---|---|
2.11 | 3.9 | 5.x |
2.12, 2.13 | 3.10 | 24.x |
2.14, 2.15 | 3.11 | 24.x |
2.16, 2.17 | 3.12 | 26.x |
2.18, 2.19 | 3.13 | 26.x |
2.20, 2.21 | 3.14 | 26.x |
The point of the image is to be a source for COPY --from: /emg-export holds the runtime
(/usr/local/share/epicmorg/ansible/<major.minor>), its Python and the libraries that Python links, plus
debian-deps.txt - the Debian packages of the system libraries it needs. Consumers (Debian 13):
FROM ghcr.io/epicmorg/ansible:2.21 AS ansible
FROM ghcr.io/epicmorg/debian:trixie
COPY --from=ansible /emg-export/ /
RUN apt-get update && apt-get install -y --no-install-recommends \
$(cat /usr/local/share/epicmorg/ansible/2.21/debian-deps.txt) sshpass openssh-client rsync
epicmorg/teamcity-agent:ansible-<ver> is built exactly that way.
/usr/local/share/epicmorg/ansible/<major.minor>/venv with ansible-core, ansible-lint, yamllint, netaddr,
jmespath, hvac, pyvmomi, pywinrm + pyspnego, paramiko, ansible-pylibssh (requirements.txt in the version folder; every package at its
newest release for that Python / ansible-core);/usr/local/share/epicmorg/ansible/<major.minor>/collections (ANSIBLE_COLLECTIONS_PATH,
collections.yml, each at its newest release whose requires_ansible accepts the line): ansible.posix,
ansible.windows, community.windows, community.general, community.crypto, community.docker,
community.hashi_vault, community.vmware, vmware.vmware (2.15+), chocolatey.chocolatey;ansible* and yamllint symlinked into /usr/local/bin; sshpass, openssh-client, rsync from Debian.Fatal build-time checks: ansible on PATH is the venv one, exact ansible [core <version>], Python version, no
unresolved libraries in the Python and its modules, ssl / sqlite3 / lzma / ... import, ansible-lint --version,
collection list, ansible localhost -m ping.
Environment: EMG_ANSIBLE_VERSION (line), EMG_ANSIBLE_CORE_VERSION, EMG_ANSIBLE_PYTHON, EMG_ANSIBLE_DIR,
ANSIBLE_COLLECTIONS_PATH.
Every file of a version folder is generated by
bin/python/ansible-versions-sync.py
(--add 2.22 for a new line).
| Tags | Dockerfile |
|---|---|
2.11, 2.11.12 | 2.11 |
2.12, 2.12.10 | 2.12 |
2.13, 2.13.13 | 2.13 |
2.14, 2.14.18 | 2.14 |
2.15, 2.15.13 | 2.15 |
2.16, 2.16.19 | 2.16 |
2.17, 2.17.14 | 2.17 |
2.18, 2.18.19 | 2.18 |
2.19, 2.19.14 | 2.19 |
2.20, 2.20.10 | 2.20 |
2.21, 2.21.5, latest | 2.21 |
Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/ansible:<tag> on each) - same digest everywhere.
FROM ghcr.io/epicmorg/ansible:2.21 AS ansible
FROM ghcr.io/epicmorg/debian:trixie
ENV EMG_ANSIBLE_DIR=/usr/local/share/epicmorg/ansible/2.21
ENV ANSIBLE_COLLECTIONS_PATH=${EMG_ANSIBLE_DIR}/collections PATH=${EMG_ANSIBLE_DIR}/venv/bin:${PATH}
COPY --from=ansible ${EMG_ANSIBLE_DIR}/ ${EMG_ANSIBLE_DIR}/
RUN apt-get update && apt-get install -y --no-install-recommends python3 sshpass openssh-client rsync
The venv points at /usr/bin/python3, so the consumer must be Debian 13 (trixie) as well.
docker run --rm ghcr.io/epicmorg/ansible:2.21 ansible --version
docker pull epicmorg/ansible:latest