Ansible role to create docker container with Postgres
Tested on:
- Ubuntu 16.04
- Ansible 2.5.0
- Python 2.7.12
- Docker API 1.29
- docker-py 1.10.6
Expected requirements:
- Ubuntu/Debian any version
- python >= 2.6
- docker-py >= 1.7.0
- Docker API >= 1.20
See defaults
pg.yml
- hosts: database
roles:
- role: ansible-docker-postgres
Create and Postgres service with:
sudo ansible-playbook pg.yml
Stop and remove Postgres service with:
sudo ansible-playbook pg.yml --extra-vars "uninstall=true"
This code was developed by me during my work in SBDA Group