homeserver-iac/roles/synapse/tasks/main.yml
dogeystamp b7013cc53a
fix details
playbook has now run on real hardware
2023-09-10 19:25:29 -04:00

45 lines
1.0 KiB
YAML

---
- name: Create Synapse user
user:
name: synapse
when: '"synapse" in groups'
- name: Create Synapse directories
file:
path: "{{ item }}"
owner: synapse
group: synapse
state: directory
mode: "u=rwX,g=,o="
with_items:
- "{{ dataroot }}/synapse/data"
- "{{ dataroot }}/synapse/media_store"
- 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 == ""
- name: Deploy Synapse config
template:
src: homeserver.yaml.j2
dest: "{{ dataroot }}/synapse/data/homeserver.yaml"
lstrip_blocks: yes
- name: Deploy Synapse logging config
template:
src: log.config.j2
dest: "{{ dataroot }}/synapse/data/log.config"
lstrip_blocks: yes