Add matrix-synapse role
parent
f857d5970c
commit
00fe348e92
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
---
|
||||||
|
- hosts: trinity.adm.crans.org
|
||||||
|
roles:
|
||||||
|
- matrix-synapse
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: Restart matrix-synapse
|
||||||
|
service:
|
||||||
|
name: matrix-synapse
|
||||||
|
state: restarted
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- name: Configure Debian backports repository
|
||||||
|
template:
|
||||||
|
src: apt/sources.list.d/backports.list.j2
|
||||||
|
dest: /etc/apt/sources.list.d/backports.list
|
||||||
|
|
||||||
|
- name: Install matrix-synapse
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
default_release: "{{ ansible_lsb.codename }}-backports"
|
||||||
|
name: matrix-synapse
|
||||||
|
register: apt_result
|
||||||
|
retries: 3
|
||||||
|
until: apt_result is succeeded
|
||||||
|
|
||||||
|
- name: Configure matrix-synapse
|
||||||
|
template:
|
||||||
|
src: "matrix-synapse/conf.d/{{ item }}.j2"
|
||||||
|
dest: "/etc/matrix-synapse/conf.d/{{ item }}"
|
||||||
|
mode: 0640
|
||||||
|
owner: matrix-synapse
|
||||||
|
group: nogroup
|
||||||
|
loop:
|
||||||
|
- app_service_config_files.yaml
|
||||||
|
- database.yaml
|
||||||
|
- listeners.yaml
|
||||||
|
- report_stats.yaml
|
||||||
|
- server_name.yaml
|
||||||
|
notify: Restart matrix-synapse
|
|
@ -0,0 +1 @@
|
||||||
|
deb {{ debian_mirror }} {{ ansible_lsb.codename }}-backports main contrib non-free
|
|
@ -0,0 +1 @@
|
||||||
|
app_service_config_files: ["/var/local/matrix-appservice-irc/registration.yaml"]
|
|
@ -0,0 +1,9 @@
|
||||||
|
database:
|
||||||
|
name: "psycopg2"
|
||||||
|
args:
|
||||||
|
user: "{{ matrix_synapse.database_user }}"
|
||||||
|
password: "{{ matrix_synapse.database_password }}"
|
||||||
|
database: "{{ matrix_synapse.database_name }}"
|
||||||
|
host: "{{ matrix_synapse.database_host }}"
|
||||||
|
cp_min: 5
|
||||||
|
cp_max: 10
|
|
@ -0,0 +1,14 @@
|
||||||
|
listeners:
|
||||||
|
- port: 8008
|
||||||
|
tls: false
|
||||||
|
bind_addresses:
|
||||||
|
- '::'
|
||||||
|
- '0.0.0.0'
|
||||||
|
type: http
|
||||||
|
x_forwarded: true
|
||||||
|
resources:
|
||||||
|
- names: [client]
|
||||||
|
compress: true
|
||||||
|
- names: [federation]
|
||||||
|
compress: false
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
report_stats: false
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
server_name: crans.org
|
||||||
|
|
Loading…
Reference in New Issue