[refactor] move worker configs into template

This commit is contained in:
Nico Schottelius 2024-02-21 17:41:10 +09:00
parent 9660cb9a51
commit cde72ad340
5 changed files with 18 additions and 44 deletions

View file

@ -63,6 +63,7 @@ runa:
mtx-elem-1.lta.internal.ru.com:
matrix_service: "elementweb"
mtx-syna-1.lta.internal.ru.com:
matrix_service: "synapse"
nfs:
mounts:
- src: mtx-storage-1.lta.internal.ru.com:/srv/nfs_synapse

View file

@ -1,20 +0,0 @@
worker_app: synapse.app.generic_worker
worker_name: synapse-worker-federation
worker_log_config: /config/log-worker-federation.yaml
worker_listeners:
- type: http
port: 8008
x_forwarded: true
resources:
- names:
- client
- federation
- port: 9000
type: metrics
tls: false
x_forwarded: true
resources:
- names: [metrics]
compress: false

View file

@ -1,20 +0,0 @@
worker_app: synapse.app.generic_worker
worker_name: synapse-worker-sync
worker_log_config: /config/log-worker-sync.yaml
worker_listeners:
- type: http
port: 8008
x_forwarded: true
resources:
- names:
- client
- federation
- port: 9000
type: metrics
tls: false
x_forwarded: true
resources:
- names: [metrics]
compress: false

View file

@ -26,10 +26,23 @@
- nginx
- synapse
- name: Create worker configurations
ansible.builtin.template:
src: "synapse/synapse-worker.yaml"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/synapse-worker-{{ item }}.yaml
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- log
- synapse
loop:
- generic
- federation
- sync
- name: Create log configurations
ansible.builtin.template:
src: "nginx/synapse.conf"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/log-{{ item }}.conf
src: "synapse/log.yaml"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/log-{{ item }}.yaml
owner: "{{ ansible_user }}"
mode: '0644'
tags:

View file

@ -1,7 +1,7 @@
worker_app: synapse.app.generic_worker
worker_name: synapse-worker-generic
worker_name: synapse-worker-{{ item }}
worker_log_config: /config/log-worker-generic.yaml
worker_log_config: /config/log-worker-{{ item }}.yaml
worker_listeners:
- port: 8008