Ubuntu 22.04 LTS (Jammy Jellyfish) Docker container for Ansible playbook and role testing.
This image is built on ghcr.io automatically any time the official OS container is rebuilt, and any time a commit is made or merged to the master
branch. But if you need to build the image on your own locally, do the following:
- Install Docker.
cd
into this directory.- Run
docker build -t ubuntu2204-ansible .
- Install Docker.
- Pull this image from ghcr.io:
docker pull ghcr.io/mint-hosting/docker-ubuntu2204-ansible/docker-ubuntu2204-ansible:latest
- Run a container from the image:
docker run --detach --privileged ghcr.io/mint-hosting/docker-ubuntu2204-ansible/docker-ubuntu2204-ansible:latest
- Use Ansible inside the container:
a.docker exec --tty [container_id] env TERM=xterm ansible --version
b.docker exec --tty [container_id] env TERM=xterm ansible-playbook /path/to/ansible/playbook.yml --syntax-check
This container image allow us to test Ansible playbooks and roles with Molecule framework.
Created in 2023. by Petar Kozic petar.kozic@mint.rs