Small demo on how to use Ansible to provision Docker containers
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.
tasks
README.md
ansible.cfg
development.yml
hosts
production.yml

README.md

Ansible - Docker demo

Prerequisites

If you don't have Docker installed, follow the instructions here to install it.

Install Ansible on Ubuntu

sudo apt-get install software-properties-common -y
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible -y

Install docker-py (assuming you have pip installed)

pip install docker-py

Demo

Get development environment up

ansible-playbook development.yml

Deploy to production

ansible-playbook production.yml

(you should edit the production server in the hosts file for this to work)