Fedora Docker container for Ansible playbook and role testing.
If you need to build the image on your own locally, do the following:
- Install Docker.
cd
into this directory.- Run
docker build -t docker-fedora33-ansible .
- Install Docker.
- Pull this image from Docker Hub:
docker pull cisagov/docker-fedora33-ansible:latest
(or use the image you built earlier). - Run a container from the image:
docker run --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro cisagov/docker-fedora33-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 was originated by:
Shane Frasier - jeremy.frasier@trio.dhs.gov from here
Heavily based on geerlingguy/docker-fedora32-ansible by Jeff Geerling AKA @geerlingguy.