ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 3c892fae8436c5e97135712ef3276be143e381eb
parent 7e20e75335328c13cc09b0db9ce771c5a901d1f3
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Mon,  6 May 2019 21:42:18 +0300

xmpp: Remove role and config for Prosody

Diffstat:
ansible/inventory/group_vars/xmpp/ferm.yml | 11-----------
ansible/inventory/host_vars/spinny/ferm.yml | 19-------------------
ansible/inventory/host_vars/spinny/haproxy.yml | 6++----
ansible/playbooks/prosody.yml | 10----------
ansible/roles/chat.erethon.com/tasks/main.yml | 15---------------
ansible/roles/haproxy/templates/haproxy.cfg.j2 | 8--------
6 files changed, 2 insertions(+), 67 deletions(-)

diff --git a/ansible/inventory/group_vars/xmpp/ferm.yml b/ansible/inventory/group_vars/xmpp/ferm.yml @@ -1,11 +0,0 @@ ---- - -ferm__group_rules: - - type: 'accept' - filename: 'prosody' - name: 'prosody' - table: 'filter' - chain: 'INPUT' - dport: [ 5269 ] - protocol: 'tcp' - domain: 'ip' diff --git a/ansible/inventory/host_vars/spinny/ferm.yml b/ansible/inventory/host_vars/spinny/ferm.yml @@ -69,22 +69,3 @@ ferm__host_rules: MASQUERADE; } } - - - type: 'accept' - filename: 'prosody_forward' - name: 'prosody_forward' - table: 'filter' - chain: 'FORWARD' - domain: 'ip' - state: 'NEW' - dport: [ 5222 ] - - - type: 'custom' - filename: 'prosody_nat' - name: 'prosody_nat' - rules: | - domain ip table nat chain PREROUTING { - protocol tcp dport 5222 { - DNAT to {{ prosody__private_ip }}:5222; - } - } diff --git a/ansible/inventory/host_vars/spinny/haproxy.yml b/ansible/inventory/host_vars/spinny/haproxy.yml @@ -1,14 +1,12 @@ --- -prosody__public_ip: '163.172.24.171' -prosody__private_ip: '192.168.122.2' static__private_ip: '192.168.122.2' buildbot__private_ip: '192.168.122.57' -certs__names: ['f.erethon.com', 'chat.erethon.com', 'grafana.erethon.com', +certs__names: ['f.erethon.com', 'matrix.erethon.com', 'grafana.erethon.com', 'capitalism.erethon.com', 'blog.erethon.com', 'erethon.com', 'www.plothopes.com', 'about.erethon.com', 'git.erethon.com', - 'buildbot.erethon.com'] + 'buildbot.erethon.com', 'etherpad.erethon.com'] buildbot__username: '{{ lookup("password", secret + "/credentials/spinny.erethon.com/haproxy/username") }}' buildbot__password: '{{ lookup("password", secret + "/credentials/spinny.erethon.com/haproxy/password") }}' diff --git a/ansible/playbooks/prosody.yml b/ansible/playbooks/prosody.yml @@ -1,10 +0,0 @@ ---- - -- hosts: xmpp - become: True - - roles: - - - role: debops.ferm - tags: [ 'role::ferm' ] - - role: chat.erethon.com diff --git a/ansible/roles/chat.erethon.com/tasks/main.yml b/ansible/roles/chat.erethon.com/tasks/main.yml @@ -1,15 +0,0 @@ ---- - -- name: chat.erethon.com xmpp docker - docker: - name: chat.erethon.com - image: prosody/prosody - state: restarted - restart_policy: always - pull: always - ports: - - 5222:5222 - - 5269:5269 - volumes: - - /data/volumes/prosody/etc:/etc/prosody:ro - - /data/volumes/prosody/data:/var/lib/prosody diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -31,14 +31,6 @@ defaults userlist buildbotusers user {{ buildbot__username }} password {{ buildbot__password }} -frontend prosody_muc - bind {{ prosody__public_ip }}:5269 - mode tcp - default_backend prosody_muc - -backend prosody_muc - mode tcp - server prosody_muc {{ prosody__private_ip }}:5269 frontend eighty bind *:80