Ansible Playbook inside docker container
246
Ansible Playbook inside docker container
Normally we would install Ansible to our control node just like any other application, but an alternate strategy is to install Ansible inside a standalone Docker image.
In control node Ansible requires specific Python libraries and their system dependencies. So instead of using package manager to install Ansible and it's dependencies we can just pull a Docker image.
docker pull adisakshya/ansible:latest
docker run -it --rm adisakshya/ansible:latest ansible <command>
docker run -it --rm -v "path/to/playbooks/directory:/ansible/playbooks" adisakshya/ansible:latest ansible-playbook <playbook-name.yml>
Content type
Image
Digest
Size
88.4 MB
Last updated
over 6 years ago
docker pull adisakshya/ansible