Ubuntu 18.04 LTS (Bionic) 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 ubuntu1804-ansible .
- Install Docker.
- Pull this image from ghcr.io:
docker pull ghcr.io/mint-hosting/docker-ubuntu1804-ansible/docker-ubuntu1804-ansible:latest
- Run a container from the image:
docker run --detach --privileged ghcr.io/mint-hosting/docker-ubuntu1804-ansible/docker-ubuntu1804-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 2022. by Petar Kozic petar.kozic@mint.rs