The Ansible IT automation tools in a container.
462
Image to make the Ansible tools available in a container.
I wanted to be able to run several version of Ansible without having to maintain too many images. Therefore, when you run this image, you need to mount the ansible code as a volume. See the usage section for examples.
# get the ansible code
# checkout the branch you want to use
git clone git://github.com/ansible/ansible.git --recursive ~/tools/ansible
git checkout devel
git submodule update --init --recursive
ansible_path="${HOME}/tools/ansible"
# ansible
docker run \
--name ansible \
--rm \
--volume ${ansible_path}:/ansible \
pamplemousse/ansible \
ansible
# ansible-playbook
# run from your project folder to mount it as a volume
docker run \
--name ansible-playbook \
-it --rm \
--volume ${ansible_path}:/ansible \
--volume $(pwd):/home/ansible/project \
-w /home/ansible/project \
pamplemousse/ansible \
ansible-playbook
# ansible-galaxy
# run from your project folder to mount it as a volume
docker run \
--name ansible-galaxy \
--rm \
--volume ${ansible_path}:/ansible \
--volume $(pwd):/home/ansible/project
-w /home/ansible/project \
pamplemousse/ansible \
ansible-galaxy
Content type
Image
Digest
Size
74.6 MB
Last updated
almost 7 years ago
docker pull pamplemousse/ansible