ansible-debops-infrastructure

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit b06919650712c63036e97e65db52aad9c591e438
parent e97290013624afc8c39eef584180d4cac0e6df4a
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Mon,  4 Dec 2017 03:03:15 +0200

Add files for etherpad.erethon.com

Diffstat:
ansible/inventory/group_vars/etherpad/all.yml | 3+++
ansible/playbooks/etherpad.erethon.yml | 8++++++++
ansible/roles/etherpad.erethon.com/tasks/main.yml | 30++++++++++++++++++++++++++++++
3 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/ansible/inventory/group_vars/etherpad/all.yml b/ansible/inventory/group_vars/etherpad/all.yml @@ -0,0 +1,3 @@ +--- + +etherpad__mysql_root_password: '{{ lookup("password", secret + "/credentials/etherpad.erethon.com/mysql/password") }}' diff --git a/ansible/playbooks/etherpad.erethon.yml b/ansible/playbooks/etherpad.erethon.yml @@ -0,0 +1,8 @@ +--- + +- hosts: spinny + become: True + + roles: + - role: debops.secret + - role: etherpad.erethon.com diff --git a/ansible/roles/etherpad.erethon.com/tasks/main.yml b/ansible/roles/etherpad.erethon.com/tasks/main.yml @@ -0,0 +1,30 @@ +--- + +- name: etherpad.erethon.com mysql docker + docker_container: + name: etherpad-db + image: mysql/mysql-server + state: started + restart_policy: always + pull: true + ports: + - 127.0.0.1:3306:3306 + volumes: + - /data/volumes/etherpad:/var/lib/mysql + env: + MYSQL_ROOT_PASSWORD="{{ etherpad__mysql_root_password }}" + +- name: etherpad.erethon.com node docker + docker_container: + name: etherpad-node + image: tvelocity/etherpad-lite + state: started + restart_policy: always + pull: true + ports: + - 127.0.0.1:18084:9001 + env: + ETHERPAD_DB_PASSWORD="{{ etherpad__mysql_root_password }}" + ETHERPAD_DB_HOST="mysql" + ETHERPAD_DB_NAME="pad" + links: etherpad-db:mysql