Skip to content
An ansible docker connection example.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
docker-machine.py
playbook.yml

README.md

Divhide

Using a docker connection with ansible

This contains an example of an ansible playbook that starts up a docker container using docker-machine and uses an ansible docker connection to do the machine setup.


# initialize docker-machine
docker-machine start local
eval "$(docker-machine env local)"

# run the playbook using the dynamic inventory
ansible-playbook -i docker-machine.py playbook.yml

# check docker running containers
docker ps

# connect to running instance
docker exec -it XXXXXXX bash

You can read more about it on this blog post.

Author

Oscar Brito

You can’t perform that action at this time.