Ubuntu 14.04 LTS (Trusty) Ansible Test Image
Ubuntu 14.04 LTS (Trusty) Docker container for Ansible playbook, role and serverspec testing.
Build the image
This image is built on Docker Hub automatically any time the upstream OS container is rebuilt, and any time a commit is made or merged to the
If you need to build the image on your local environment, do the following steps:
- Clone the repo
$ git clone email@example.com:darkraiden/docker-ubuntu1404-ansible;
cdinto this directory;
$ docker build -t ubuntu-ansible ..
How to Use
- Pull this image from Docker Hub:
docker pull davidedimauro88/ubuntu1404-ansible:latestor use the image's tag you built earlier, e.g.
- Run a container:
docker run -d --privileged davidedimauro88/ubuntu1404-ansible:latest /bin/systemd(To test an Ansible role, you may want to mount a volume with your role's directory as source and
/etc/ansible/roles/role_under_testas destination on the container itself);
- Use Ansible inside the container:
docker exec --tty [container_id] env TERM=xterm ansible --version
docker exec --tty [container_id] env TERM=xterm ansible-playbook /path/to/ansible/playbook.yml --syntax-check
This container is for test purposes only, I do not use it in a production environment. Use it on a live environment at your own risk!
Created in 2017 by Davide Di Mauro.