Archlinux Docker container for Ansible playbook and role testing
5.7K
Archlinux Docker container for Ansible playbook and role testing. Adapted from Jeff Geerlings fabulous container images for ansible testing.
The image is built once a week in this GitHub actions workflow to keep the repository on Docker Hub up to date with arch linux's rolling release. But if you need to build the image on your own locally, do the following:
cd into this directory.docker build -t archlinux-ansible .docker pull gliech/docker-archlinux-ansible:latest (or use the image you built
earlier, e.g. archlinux-ansible:latest).docker run --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro gliech/docker-archlinux-ansible:latest (to test Ansible roles, you can
add in a volume mounted from the current working directory with
--volume=`pwd`:/etc/ansible/roles/role_under_test:ro).docker exec --tty [container_id] env TERM=xterm ansible --versiondocker exec --tty [container_id] env TERM=xterm ansible-playbook /path/to/ansible/playbook.yml --syntax-checkImportant Note: The image is meant to be used for testing in an isolated environment not for production. The settings and configuration used may not be suitable for a secure and performant production environment. Use on production servers/in the wild at your own risk!
Original images and documentation by Jeff Geerling, author of Ansible for DevOps. Adapted for Archlinux by Gregor Bückendorf.
Content type
Image
Digest
sha256:072bf5707…
Size
339.2 MB
Last updated
8 months ago
docker pull gliech/docker-archlinux-ansible