mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-14 05:02:27 +00:00
41 lines
946 B
YAML
41 lines
946 B
YAML
---
|
|
- name: Create directory for media storage
|
|
file:
|
|
name: "/opt/synapse/{{ item }}"
|
|
state: directory
|
|
owner: synapse
|
|
group: synapse
|
|
loop:
|
|
- media_store
|
|
- uploads
|
|
- ssl
|
|
|
|
- name: Deploy config
|
|
template:
|
|
src: "homeserver.yaml.j2"
|
|
dest: "/opt/synapse/homeserver.yaml"
|
|
owner: synapse
|
|
group: synapse
|
|
notify:
|
|
- "restart synapse"
|
|
|
|
- name: Configure logging
|
|
import_tasks: logging.yml
|
|
|
|
- name: Create signing key
|
|
shell: >
|
|
/opt/synapse/env/bin/python -c "
|
|
from signedjson import key;
|
|
with open('/opt/synapse/ssl/{{ matrix_synapse_domain}}.signing.key','w') as file:
|
|
key.write_signing_keys(file, [key.generate_signing_key('first')]);
|
|
"
|
|
args:
|
|
creates: /opt/synapse/ssl/{{ matrix_synapse_domain }}.signing.key
|
|
become: true
|
|
become_user: synapse
|
|
notify:
|
|
- "restart synapse"
|
|
|
|
- name: Create certificates
|
|
include_tasks: ssl.yml
|
|
when: not matrix_synapse_skip_ssl
|