ansible-collection-famedly-.../tasks/configure.yml
2019-02-15 03:07:28 +01:00

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