Alpine-based Docker images with Ansible for use in pipelines.
2.6K
Build the image
export ANSIBLE_VERSION='10'
docker build --build-arg="ANSIBLE_VERSION=${ANSIBLE_VERSION}" -t "docker-ansible:${ANSIBLE_VERSION}" -f Dockerfile .
Run ansible-playbook
docker run --rm -v $(pwd):/ansible -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -t "docker-ansible:${ANSIBLE_VERSION}" ansible-playbook -i inventory.yml playbook.yml
MIT
Melekhin Anton.
docker pull antmelekhin/ansible:latest