Simple container do create a unified ansible environment.
1.2K
To map the ssh-agent into docker do:
docker run --rm -ti -v $SSH_AUTH_SOCK:/auth_sock -e SSH_AUTH_SOCK=/auth_sock -v /ansible/infrastructure:/infra hg8496/ansible ansible -u USER all -m ping
With all your ansible infrastructure under ./infra write the following Dockerfile
Dockerfile
FROM hg8496/ansible
COPY infra /infra
then docker build --force-rm -t ansible . to build your image.
Execute with sudo docker run --rm -ti -v $SSH_AUTH_SOCK:/auth_sock -e SSH_AUTH_SOCK=/auth_sock ansible ansible -u USER all -m ping
Content type
Image
Digest
Size
384 MB
Last updated
over 5 years ago
docker pull hg8496/ansible