mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-14 05:02:27 +00:00
37 lines
882 B
YAML
37 lines
882 B
YAML
---
|
|
|
|
- name: Generate registration secret
|
|
block:
|
|
- command: /usr/bin/pwgen -sn 84 1
|
|
register: pwgen
|
|
delegate_to: localhost
|
|
become: false
|
|
- set_fact:
|
|
matrix_synapse_registration_secret: "{{ pwgen.stdout }}"
|
|
when: matrix_synapse_registration_secret is not defined
|
|
|
|
- name: Create directory for media storage
|
|
file:
|
|
name: "{{ item }}"
|
|
state: directory
|
|
owner: synapse
|
|
group: synapse
|
|
loop:
|
|
- "{{ matrix_synapse_config.media_store_path }}"
|
|
- "{{ matrix_synapse_config.uploads_path }}"
|
|
- /opt/synapse/tls
|
|
|
|
- name: Deploy config
|
|
copy:
|
|
content: "{{ matrix_synapse_config | to_nice_yaml }}"
|
|
dest: "/opt/synapse/homeserver.yaml"
|
|
owner: synapse
|
|
group: synapse
|
|
notify:
|
|
- "restart synapse"
|
|
|
|
- name: Configure logging
|
|
import_tasks: logging.yml
|
|
|
|
- name: Create certificates
|
|
include_tasks: crypto.yml
|