homeserver-iac/roles/synapse/tasks/main.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2023-09-07 21:47:16 -04:00
---
- name: Create Synapse user
user:
name: synapse
when: '"synapse" in group_names'
2023-09-07 21:47:16 -04:00
- name: Create Synapse directories
file:
path: "{{ item }}"
owner: synapse
group: synapse
state: directory
mode: "u=rwX,g=,o="
with_items:
- "{{ dataroot }}/synapse/data"
2023-09-09 09:05:05 -04:00
- "{{ dataroot }}/synapse/media_store"
2023-09-07 21:47:16 -04:00
- name: Ensure that form secret exists
fail:
msg: Missing form_secret; have you configured vault.yml?
when: form_secret == ""
- name: Ensure that macaroon secret exists
fail:
msg: Missing macaroon_secret; have you configured vault.yml?
when: form_secret == ""
- name: Ensure that registration secret exists
fail:
msg: Missing registration_secret; have you configured vault.yml?
when: registration_shared_secret == ""
2023-09-07 21:47:16 -04:00
- name: Deploy Synapse config
template:
src: homeserver.yaml.j2
dest: "{{ dataroot }}/synapse/data/homeserver.yaml"
owner: synapse
group: synapse
2023-09-07 21:47:16 -04:00
lstrip_blocks: yes
- name: Deploy Synapse logging config
template:
2023-09-09 09:05:05 -04:00
src: log.config.j2
2023-09-07 21:47:16 -04:00
dest: "{{ dataroot }}/synapse/data/log.config"
owner: synapse
group: synapse
2023-09-07 21:47:16 -04:00
lstrip_blocks: yes