- Install Docker.
- clone this repo
cd
intodocker-ubuntu1604-ansible
.- Run
docker build -t ubuntu1604 .
- Install Docker.
- Pull this image from Docker Hub:
docker pull lestex/docker-ubuntu1604-ansible
. Use thelatest
tag. - Run a container from the image:
docker run -p --name test --privileged -v=/sys/fs/cgroup:/sys/fs/cgroup:ro lestex/docker-ubuntu1604-ansible /lib/systemd/systemd
- Use Ansible inside the container:
docker exec -it test ansible --version
docker exec -it test ansible-lint /path/to/ansible/playbook.yml
Created by Andrey Larin.