Archlinux Docker container for Ansible playbook and role testing.
9.7K
Archlinux Docker container for Ansible playbook and role testing.
This box is intended for testing and development purposes only. DO NOT use in production environments.
This Docker Image contains:
These are intentionally included for transparent testing but make this box completely insecure for production use.
latest: Latest stable version of Ansible, with Python 3.x.docker pull pluggero/docker-archlinux-ansible:latestdocker run --name test-container -d --privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
--cgroupns=host \
pluggero/docker-archlinux-ansible:latest
docker exec --tty test-container env TERM=xterm ansible --version
docker exec --tty test-container env TERM=xterm ansible-playbook /path/to/playbook.yml --syntax-check
To test Ansible roles, mount your role:
docker run --name test-container -d --privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
--cgroupns=host \
--volume="$(pwd):/etc/ansible/roles/role_under_test:ro" \
pluggero/docker-archlinux-ansible:latest
Note: Avoid mounting your workstation's cgroup volume with read-write permissions as it can break your session. Only use this inside of a virtual machine.
cd into it../scripts/archlinux_builder.sh
The build process:
I use Docker to test my Ansible roles and playbooks on multiple OSes using CI tools like Jenkins and Travis. This container allows me to test roles and playbooks using Ansible running locally inside the container.
Important Note: I use this image for testing in an isolated environment—not for production—and 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!
To ensure the Docker image you download was built from this repository without modification, follow these verification steps:
# Download the checksums file from the GitHub Actions artifacts
# Visit: https://github.com/pluggero/docker-archlinux-ansible/actions/workflows/release.yml
# Click on the workflow run for your version
# Download the "checksums-VERSION" artifact
# Install GitHub CLI if not already installed: https://cli.github.com/
# Verify the checksums file was generated by our CI/CD pipeline
gh attestation verify checksums.txt --owner pluggero
This cryptographically proves the checksums file was created by our pipeline from a specific git commit.
# Get the digest from checksums.txt
cat checksums.txt
# Pull the image by digest (from checksums.txt)
docker pull pluggero/docker-archlinux-ansible@sha256:<digest-from-checksums.txt>
# Or verify your existing image digest matches
docker inspect --format='{{index .RepoDigests 0}}' pluggero/docker-archlinux-ansible:latest
The digest must match. If it doesn't, the image was modified after the build.
Content type
Image
Digest
sha256:d557253dd…
Size
631.1 MB
Last updated
7 days ago
docker pull pluggero/docker-archlinux-ansible