HUB
Sign inSign up
ansible logo

epicmorg/ansible

By epicmorg

•Updated about 5 hours ago

ansible-core (newest patch of each line) + ansible-lint + collections in a venv, for COPY --from

Image
0

9.2K

epicmorg/ansible repository overview

⁠epicmorg/ansible

One 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-corePythonansible-lint
2.113.95.x
2.12, 2.133.1024.x
2.14, 2.153.1124.x
2.16, 2.173.1226.x
2.18, 2.193.1326.x
2.20, 2.213.1426.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.

⁠What's inside

  • venv /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);
  • collections in /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

TagsDockerfile
2.11, 2.11.122.11⁠
2.12, 2.12.102.12⁠
2.13, 2.13.132.13⁠
2.14, 2.14.182.14⁠
2.15, 2.15.132.15⁠
2.16, 2.16.192.16⁠
2.17, 2.17.142.17⁠
2.18, 2.18.192.18⁠
2.19, 2.19.142.19⁠
2.20, 2.20.102.20⁠
2.21, 2.21.5, latest2.21⁠

Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/ansible:<tag> on each) - same digest everywhere.

⁠Usage

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
Tag summary
Recent tags
Content type
Image
Digest
sha256:ad72c7375…
Size
1.4 GB
Last updated
about 5 hours ago
docker pull epicmorg/ansible:latest