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

44 lines
1 KiB
YAML
Raw Normal View History

2018-07-30 16:56:33 +02:00
---
- name: Create directory for media storage
file:
name: "/opt/synapse/{{ item }}"
2018-07-30 16:56:33 +02:00
state: directory
owner: synapse
group: synapse
loop:
- media_store
- uploads
- ssl
2018-07-30 16:56:33 +02:00
- name: Create signing key
shell: /opt/synapse/env/bin/python -c "from signedjson import key; file = open('/opt/synapse/ssl/{{ matrix_synapse_domain}}.signing.key','w'); key.write_signing_keys(file, [key.generate_signing_key('first')]); file.close()"
args:
creates: /opt/synapse/ssl/{{ matrix_synapse_domain }}.signing.key
become: true
become_user: synapse
notify:
- "restart synapse"
- name: Deploy config
template:
src: "homeserver.yaml.j2"
dest: "/opt/synapse/homeserver.yaml"
owner: synapse
group: synapse
notify:
- "restart synapse"
- name: Configure logging
import_tasks: logging.yml
2018-07-30 16:56:33 +02:00
args:
creates: /opt/synapse/ssl/{{ matrix_synapse_domain }}.dh
chdir: /opt/synapse
become_user: synapse
become: true
- name: Use letsencrypt certificate
include_tasks: letsencrypt.yml
when: not skip_letsencrypt