Created
December 21, 2018 11:28
-
-
Save Hendrik44/e81168c8c06dd1c45b400f60cbc26ef9 to your computer and use it in GitHub Desktop.
Test ansible roles in centos docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start container | |
docker run --rm --name centos7 --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro --volume=`pwd`:/etc/ansible/roles/rolename:ro geerlingguy/docker-centos7-ansible:latest | |
# go into container an run your playbook | |
docker exec -it centos7 bash | |
# for clean state exit from container and run: | |
docker stop centos7 && docker rm centos7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment