Container image with Ansible and clients for Docker, Podman and OpenStack
10K+
Container image with Ansible, built on gwerlas/ansible-core, and what its modules need for Docker, Podman, Libvirt, Kubernetes and OpenStack.
GitLab Project : yoanncolin/container-images/ansible.
The openstack command line client is not embedded: only openstacksdk, which
the openstack.cloud modules use. Run the client from
gwerlas/openstack-client.
Check end of life dates before chosing your version :
| Version | Base image | Rebuild | Tags | Source |
|---|---|---|---|---|
| 14 | gwerlas/ansible-core:2.21 | Weekly | 14.4.0, 14.4, 14, 14.4.0-alpine, 14.4-alpine, 14-alpine, alpine, latest | Dockerfile |
| 14 | debian:forky | Weekly | 14.0.0-debian, 2.22.01-debian, 14.0-debian, 2.22-debian, 14-debian, 2-debian, debian | Dockerfile |
| 13 | gwerlas/ansible-core:2.20 | Weekly | 13.8.0, 13.8, 13, 13.8.0-alpine, 13.8-alpine, 13-alpine | Dockerfile |
| 12 | gwerlas/ansible-core:2.19 | Weekly | 12.3.0, 12.3, 12, 12.3.0-alpine, 12.3-alpine, 12-alpine | Dockerfile |
Key tools embedded in each actively rebuilt image :
| Tool | 14 | 13 | 12 | 14 (debian) |
|---|---|---|---|---|
| ansible | 14.4.0 | 13.8.0 | 12.3.0 | 14.0.0 |
| ansible-core | 2.21.4 | 2.20.9 | 2.19.13 | 2.22.0 |
| helm | 4.2.2 | 4.2.2 | 4.2.2 | 4.3.0 |
| kubectl | 1.36.1 | 1.36.1 | 1.34.2 | 1.37.1 |
| podman | 5.8.8 | 5.8.8 | 5.7.0 | 5.8.6 |
| docker | 29.8.2 | 29.8.2 | 29.5.2 | 28.5.2 |
| openstacksdk | 4.10.0 | 4.10.0 | 4.10.0 | — |
| openssl | 3.5.9 | 3.5.9 | 3.5.9 | 3.6.4 |
| keytool | 21.0.12 | 21.0.12 | 21.0.12 | — |
More details about the embedded software with :
docker run --rm -t gwerlas/ansible ansible-playbook versions.yml
Simple usages
docker run gwerlas/ansible ansible --version
docker run gwerlas/ansible ansible-galaxy collection list
The container runs as the build user (non-root) inherited from the
gwerlas/ansible-core image. When mounting a local directory, make sure
it is readable and writable by that user, or pass your own UID/GID. The default
working directory is /home/build/work.
Python packages installed with pip trust the CA bundle of certifi, not the
system store. Behind a corporate CA, add it to the system store in an image
derived from this one (update-ca-certificates), and point
REQUESTS_CA_BUNDLE and SSL_CERT_FILE at /etc/ssl/certs/ca-certificates.crt.
Installing your role and running a playbook :
docker run \
-v $PWD:/home/build/work \
gwerlas/ansible \
ansible-galaxy collection install -r requirements.yml
docker run --rm -t \
-v $HOME/.ansible:/home/build/.ansible \
-v $PWD:/home/build/work \
gwerlas/ansible \
ansible-playbook playbook.yml
With Docker, mounting the libvirt or the container socket :
docker run \
-v $HOME/.ansible:/home/build/.ansible \
-v $PWD:$PWD -w $PWD \
-v /run/libvirt:/run/libvirt \
gwerlas/ansible ...
docker run \
-v $HOME/.ansible:/home/build/.ansible \
-v $PWD:/home/build/work \
-v /run/docker.sock:/run/docker.sock \
gwerlas/ansible ...
With rootless Podman :
systemctl start --user podman.service
podman run \
--userns=keep-id \
-v $HOME/.ansible:/home/build/.ansible \
-v $PWD:/home/build/work \
-v $XDG_RUNTIME_DIR/podman/podman.sock:/run/docker.sock \
gwerlas/ansible ...
Edit an Ansible Vault file, with vi, the default editor of Ansible :
docker run --rm -ti \
-v <my-dir>:/work -w /work \
gwerlas/ansible \
ansible-vault edit <my-vault-file>.yml
To make some Ansible modules usable, we embed some system tools and python modules, on top of what gwerlas/ansible-core already holds.
java.base)Content type
Image
Digest
sha256:b9fe3d23b…
Size
343.4 MB
Last updated
2 days ago
docker pull gwerlas/ansible