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.
This repos stop supporting versions as it gets EOL according to Ansible - Releases and maintenance.
v2.15-almalinuxv2.15-alpinev2.15-ubuntuv2.14-almalinuxv2.14-alpinev2.14-ubuntuv2.13-almalinuxv2.13-alpinev2.13-ubuntu
v2.15,latest-alpine,latestv2.15-alpine
v2.14v2.14-alpine
v2.13v2.13-alpine
latest-almalinuxv2.15-almalinux
latest-ubuntuv2.15-ubuntu
Container 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- uid=1000
- gid=1000
ansible-1001- uid=1001
- gid=1001
ansible-10000- uid=10000
- gid=10000
Note! All ansible users will have sudo rights. This is for convenience since some roles etc are not that well implemented.
- docker-cli
- git
- openssh
- sudo
- gosu
Below assume a playbook.yml file is located in current directory:
# docker run --rm -v ${PWD}:/mnt haxorof/ansible-coreTo 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 localhostStart a Python container in a terminal:
# docker run -it --rm --name=target python shIn 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"