Add synapse to ansible
This commit is contained in:
parent
e006f44dd6
commit
67d0c8d875
9 changed files with 164 additions and 131 deletions
_ansible/roles/synapse/tasks
36
_ansible/roles/synapse/tasks/main.yml
Normal file
36
_ansible/roles/synapse/tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
- name: Deploy {{ svc.name }}
|
||||
tags:
|
||||
- synapse
|
||||
- matrix
|
||||
block:
|
||||
- import_tasks: prepare-common-service.yml
|
||||
|
||||
- name: Set synapse config path
|
||||
ansible.builtin.set_fact:
|
||||
config_path: "{{ (service_path, svc.config_path) | path_join }}"
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ config_path }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Template config
|
||||
ansible.builtin.template:
|
||||
src: service.yml.j2
|
||||
dest: "{{ (config_path, 'homeserver.yaml') | path_join }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Copy the log config
|
||||
ansible.builtin.copy:
|
||||
src: msrg.cc.log.config
|
||||
dest: "{{ (config_path, 'msrg.cc.log.config') | path_join }}"
|
||||
mode: '0644'
|
||||
|
||||
- name: Copy the signing key
|
||||
ansible.builtin.copy:
|
||||
content: "{{ vault_synapse.signing_key }}"
|
||||
dest: "{{ (config_path, 'msrg.cc.signing.key') | path_join }}"
|
||||
mode: '0644'
|
||||
|
||||
- import_tasks: start-common-service.yml
|
Reference in a new issue