ansible-collection-famedly-.../roles/synapse/tasks/configure.yml

70 lines
1.8 KiB
YAML
Raw Normal View History

2018-07-30 14:56:33 +00:00
---
- name: Create secrets directory
file:
path: "{{ matrix_synapse_secrets_path }}"
state: directory
owner: synapse
group: synapse
mode: 0750
tags: ['prepare', 'prepare-synapse']
- name: Generate secrets
include_tasks: generate_secret.yml
loop:
- file: "macaroon.key"
var: "macaroon_file"
- file: "registration.key"
var: "registration_shared_secret_file"
- file: "form.key"
var: "form_secret_file"
loop_control:
loop_var: secret
tags: ['deploy', 'deploy-synapse']
- name: Create directory for tls
file:
path: "{{ matrix_synapse_base_path }}/tls"
state: directory
owner: synapse
group: synapse
mode: 0770
tags: ['prepare', 'prepare-synapse']
- name: Create directories for media storage
file:
path: "{{ item }}"
state: directory
owner: synapse
group: synapse
mode: 0770
loop:
- "{{ matrix_synapse_config.media_store_path }}"
- "{{ matrix_synapse_config.uploads_path }}"
# Needs matrix_synapse_config which only the previous task poplulates fully, otherwise, the secrets are undefined and break at this point
tags: ['deploy', 'deploy-synapse']
- name: Merge replication listener config
set_fact:
matrix_synapse_config: "{{ matrix_synapse_config | combine(matrix_synapse_worker_config, recursive=True, list_merge='append') }}"
when: matrix_synapse_workers_enabled
tags: ['deploy', 'deploy-synapse']
2018-07-30 14:56:33 +00:00
- name: Deploy config
copy:
content: "{{ matrix_synapse_config | to_nice_yaml }}"
2019-02-21 22:17:57 +00:00
dest: "{{ matrix_synapse_base_path }}/homeserver.yaml"
2018-07-30 14:56:33 +00:00
owner: synapse
group: synapse
mode: 0660
2018-07-30 14:56:33 +00:00
notify:
2019-02-15 02:08:08 +00:00
- "restart matrix-synapse"
tags: ['deploy', 'deploy-synapse']
2018-07-30 14:56:33 +00:00
- name: Configure logging
include_tasks: logging.yml
tags: ['always']
2018-07-30 14:56:33 +00:00
2018-12-03 22:29:19 +00:00
- name: Create certificates
2019-02-12 01:38:17 +00:00
include_tasks: crypto.yml
tags: ['always']