synapse workers: polishing, cleansing and installation of jq dependency
This commit is contained in:
@ -9,14 +9,11 @@
|
||||
state: stopped
|
||||
with_dict: "{{ ansible_facts.services|default({})|dict2items|selectattr('key', 'match', 'matrix-synapse-worker@.+\\.service')|list|items2dict }}"
|
||||
|
||||
# As we cannot know the ports of workers removed from the enabled_list..
|
||||
# => .. just kill them all (FIXME?)
|
||||
- name: Ensure previous worker service symlinks are cleaned
|
||||
- name: Ensure worker service symlinks are cleaned
|
||||
file:
|
||||
path: "{{ item.root + '/' + item.path }}"
|
||||
state: absent
|
||||
when:
|
||||
- not matrix_synapse_workers_enabled|bool
|
||||
- item.state == 'link'
|
||||
- item.path is match('matrix-synapse-worker@.*\\.service')
|
||||
with_filetree:
|
||||
@ -28,6 +25,13 @@
|
||||
state: absent
|
||||
register: matrix_synapse_worker_systemd_service_result
|
||||
|
||||
- name: Ensure worker configs are cleaned
|
||||
file:
|
||||
path: "{{ item.root + '/' + item.path }}"
|
||||
state: absent
|
||||
with_fileglob:
|
||||
- "{{ matrix_synapse_config_dir_path }}/worker.*.yaml"
|
||||
|
||||
- name: Remove workers from synapse.wants list
|
||||
set_fact:
|
||||
matrix_synapse_systemd_wanted_services_list: "{{ matrix_synapse_systemd_wanted_services_list | reject('search', item) | list }}"
|
||||
|
Reference in New Issue
Block a user