synapse workers: fix undefined variable cases when removing workers

This commit is contained in:
Marcel Partap
2020-10-28 23:09:21 +01:00
parent e078e29ef8
commit cce90b187a
2 changed files with 6 additions and 7 deletions

View File

@ -27,15 +27,14 @@
- name: Ensure worker configs are cleaned
file:
path: "{{ item.root + '/' + item.path }}"
path: "{{ item }}"
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 }}"
with_items: "{{ matrix_synapse_workers_avail_list }}"
matrix_synapse_systemd_wanted_services_list: "{{ matrix_synapse_systemd_wanted_services_list | reject('search', '^matrix-synapse-worker@') | list }}"
- name: Ensure systemd noticed removal of worker service units
service: