matrix-docker-ansible-deploy/setup.yml

99 lines
2.8 KiB
YAML
Executable File

---
- name: "Set up a Matrix server"
hosts: "{{ target if target is defined else 'matrix_servers' }}"
become: true
vars_files:
- roles/matrix-synapse/vars/workers.yml
roles:
# - matrix-awx
- matrix-base
# - matrix-dynamic-dns
# - matrix-mailer
- matrix-postgres
- matrix-redis
- matrix-corporal
- matrix-bridge-appservice-discord
- matrix-bridge-appservice-slack
- matrix-bridge-appservice-webhooks
- matrix-bridge-appservice-irc
- matrix-bridge-beeper-linkedin
- matrix-bridge-mautrix-facebook
- matrix-bridge-mautrix-twitter
- matrix-bridge-mautrix-hangouts
- matrix-bridge-mautrix-googlechat
- matrix-bridge-mautrix-instagram
- matrix-bridge-mautrix-signal
- matrix-bridge-mautrix-telegram
- matrix-bridge-mautrix-whatsapp
- matrix-bridge-mx-puppet-discord
- matrix-bridge-mx-puppet-groupme
- matrix-bridge-mx-puppet-steam
- matrix-bridge-mx-puppet-skype
- matrix-bridge-mx-puppet-slack
- matrix-bridge-mx-puppet-twitter
- matrix-bridge-mx-puppet-instagram
- matrix-bridge-sms
- matrix-bridge-heisenbridge
- matrix-bridge-hookshot
- matrix-bot-matrix-reminder-bot
- matrix-bot-matrix-registration-bot
- matrix-bot-buscarron
- matrix-bot-honoroit
- matrix-bot-go-neb
- matrix-bot-mjolnir
- matrix-synapse
- matrix-dendrite
- matrix-synapse-admin
- matrix-prometheus-node-exporter
- matrix-prometheus
- matrix-grafana
- matrix-registration
- matrix-client-element
- matrix-client-hydrogen
- matrix-client-cinny
- matrix-jitsi
- matrix-ma1sd
- matrix-dimension
- matrix-etherpad
- matrix-email2matrix
- matrix-sygnal
- matrix-nginx-proxy
- matrix-coturn
- matrix-aux
- matrix-postgres-backup
- matrix-prometheus-postgres-exporter
- matrix-backup-borg
- matrix-common-after
tasks:
- name: Ensure web-user is present
user:
name: "{{ web_user }}"
state: present
system: yes
register: web_user_res
tags: [ setup-caddy, setup-all, start ]
- name: Ensure directory for revproxy config is present
file:
path: "{{ revproxy_autoload_dir }}/matrix"
state: directory
owner: "{{ web_user_res.uid }}"
group: "{{ web_user_res.group }}"
mode: 0750
tags: [ setup-caddy, setup-all, start ]
- name: Template reverse proxy configuration
template:
src: Caddyfile.j2
dest: "{{ revproxy_autoload_dir }}/matrix/Caddyfile"
owner: "{{ web_user_res.uid }}"
group: "{{ web_user_res.group }}"
mode: 0640
tags: [ setup-caddy, setup-all, start ]
- name: Restart reverse proxy
docker_container:
name: web
state: started
restart: yes