Collection of Ansible tools inside Docker container
1.0K
Small universal image of Docker with Ansible tools for easy software deploy.
ansible : /opt/ansible - Required by Ansible files for workscripts : /opt/scripts - Collection of scripts for running via entrypoint of Dockergit clone https://github.com/EvilFreelancer/docker-ansible.git
cd docker-ansible
docker build . --tag ansible
You need put your Ansible playbook and any other files which required
for normal work into the ansible folder. On build stage this folder
will be added into the container's /opt folder.
Next you need write some script (eg run.sh), which contain some
commands, for example:
#!/bin/bash
cd /opt/ansible/
ansible-playbook -i hosts site.yml
That's easy, as any other Docker containers:
docker run ansible run.sh
Where:
If you need demonized container, try this:
docker run ansible
And container never stop, until you will not stop him (eg via docker kill).
In theory docker run ansible *.sh also must work, this command mean
what container should execute all files from /opt/scripts folder
with .sh suffix of filename.
Check the entrypoint.sh and you will get why.
Content type
Image
Digest
Size
92.2 MB
Last updated
over 8 years ago
docker pull evilfreelancer/docker-ansible