Ansible Core with additions.
Note! This image is called ansible-core but installs ansible-base for v2.10 (EOL). For later versions, v2.11 and onwards the ansible-core package is installed.
If you find bugs or got improvements of the container, feel free to submit it here.
v2.13-alpinev2.13-ubuntuv2.12-alpinev2.12-ubuntuv2.11-almalinux8v2.11-alpinev2.11-ubuntuv2.13, latest-alpine, latest
v2.13-alpinev2.12
v2.12-alpinev2.11
v2.11-alpinelatest-almalinux8
v2.11-almalinux8latest-ubuntu
v2.13-ubuntuContainer will run as user ansible-10000 by default. However, when you build your own image based on this root will be set and you need to set it back yourself to ansible-10000 if you want.
ansible-1000
ansible-1001
ansible-10000
Note! All ansible users will have sudo rights. This is for convenience since some roles etc are not that well implemented.
Below assume a playbook.yml file is located in current directory:
# docker run --rm -v ${PWD}:/mnt haxorof/ansible-core
To override the default command set you can just add your own arguments after the images name:
# docker run --rm -v ${PWD}:/mnt haxorof/ansible-core ansible -m setup -c local localhost
Start a Python container in a terminal:
# docker run -it --rm --name=target python sh
In a second terminal run the following which will do an Ansible ping to that Python container:
# docker run --rm -v /var/run/docker.sock:/var/run/docker.sock haxorof/ansible-core sh -c "echo 'target ansible_connection=docker' > hosts && ansible -m ping -i hosts all"
Content type
Image
Digest
sha256:28b6488cf…
Size
414.1 MB
Last updated
over 2 years ago
docker pull sjoshi10/ansible-core