2018-07-30 16:56:33 +02:00
|
|
|
---
|
|
|
|
- name: Create directory for media storage
|
|
|
|
file:
|
2018-12-02 23:16:49 +01:00
|
|
|
name: "/opt/synapse/{{ item }}"
|
2018-07-30 16:56:33 +02:00
|
|
|
state: directory
|
|
|
|
owner: synapse
|
|
|
|
group: synapse
|
2018-12-02 23:16:49 +01:00
|
|
|
loop:
|
|
|
|
- media_store
|
|
|
|
- uploads
|
|
|
|
- ssl
|
2018-07-30 16:56:33 +02:00
|
|
|
|
2019-02-12 02:43:26 +01:00
|
|
|
- name: Generate registration secret
|
|
|
|
block:
|
|
|
|
- command: /usr/bin/pwgen -sn 84 1
|
|
|
|
register: pwgen
|
|
|
|
- set_fact:
|
|
|
|
matrix_synapse_registration_secret: "{{ pwgen.stdout }}"
|
|
|
|
when: matrix_synapse_registration_secret is not defined
|
|
|
|
|
2018-07-30 16:56:33 +02:00
|
|
|
- name: Deploy config
|
2019-02-15 00:25:14 +01:00
|
|
|
copy:
|
|
|
|
content: "{{ matrix_synapse_config | to_nice_yaml }}"
|
2018-07-30 16:56:33 +02:00
|
|
|
dest: "/opt/synapse/homeserver.yaml"
|
|
|
|
owner: synapse
|
|
|
|
group: synapse
|
|
|
|
notify:
|
|
|
|
- "restart synapse"
|
|
|
|
|
2018-12-02 23:12:30 +01:00
|
|
|
- name: Configure logging
|
|
|
|
import_tasks: logging.yml
|
2018-07-30 16:56:33 +02:00
|
|
|
|
2018-12-03 23:29:19 +01:00
|
|
|
- name: Create certificates
|
2019-02-12 02:38:17 +01:00
|
|
|
include_tasks: crypto.yml
|