- Install Docker.
- clone this repo
cd
intodocker-centos7-ansible
.- Run
docker build -t centos7 .
- Install Docker.
- Pull this image from Docker Hub:
docker pull lestex/docker-centos7-ansible
. Use thelatest
tag. - Run a container from the image:
docker run -d --name test --privileged -v=/sys/fs/cgroup:/sys/fs/cgroup:ro lestex/docker-centos7-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