Replace yml.j2 template with copy and content

This commit is contained in:
Tobias Reisinger 2025-06-11 21:23:17 +02:00
parent 36a54fef3d
commit 4cc94969f5
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
12 changed files with 41 additions and 51 deletions
playbooks/roles/synapse
handlers
tasks

View file

@ -0,0 +1,3 @@
---
- name: Restart service {{ role_name }}
ansible.builtin.include_tasks: tasks/restart-service.yml

View file

@ -7,7 +7,6 @@
svc: "{{ synapse_svc }}"
env: "{{ synapse_env }}"
compose: "{{ synapse_compose }}"
yml: "{{ synapse_yml }}"
block:
- name: Import prepare tasks for common service
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
@ -22,23 +21,26 @@
state: directory
mode: "0755"
- name: Template config
ansible.builtin.template:
src: yml.j2
- name: Create config
ansible.builtin.copy:
dest: "{{ (config_path, 'homeserver.yaml') | path_join }}"
content: '{{ synapse_yml | to_nice_yaml }}'
mode: "0644"
notify: Restart service {{ role_name }}
- name: Copy the log config
ansible.builtin.copy:
src: msrg.cc.log.config
dest: "{{ (config_path, 'msrg.cc.log.config') | path_join }}"
mode: "0644"
notify: Restart service {{ role_name }}
- name: Copy the signing key
ansible.builtin.copy:
content: "{{ vault_synapse.signing_key }}"
dest: "{{ (config_path, 'msrg.cc.signing.key') | path_join }}"
mode: "0644"
notify: Restart service {{ role_name }}
- name: Import start tasks for common service
ansible.builtin.import_tasks: tasks/start-common-service.yml