2020-04-10 21:44:53 +00:00
|
|
|
---
|
|
|
|
|
2020-12-01 21:20:27 +00:00
|
|
|
- name: Find worker configs to be cleaned
|
|
|
|
find:
|
|
|
|
path: "{{ matrix_synapse_config_dir_path }}"
|
|
|
|
patterns: "worker.*.yaml"
|
|
|
|
use_regex: true
|
2021-01-25 10:14:46 +00:00
|
|
|
register: matrix_synapse_workers_current_config_files
|
2020-12-01 21:20:27 +00:00
|
|
|
|
2020-10-23 18:49:53 +00:00
|
|
|
- name: Ensure previous worker configs are cleaned
|
|
|
|
file:
|
2020-12-01 21:20:27 +00:00
|
|
|
path: "{{ item.path }}"
|
2020-10-23 18:49:53 +00:00
|
|
|
state: absent
|
2021-01-25 10:14:46 +00:00
|
|
|
with_items: "{{ matrix_synapse_workers_current_config_files.files }}"
|
2020-10-23 18:49:53 +00:00
|
|
|
|
2021-01-25 10:14:46 +00:00
|
|
|
- name: Find worker systemd services to be cleaned
|
|
|
|
find:
|
|
|
|
path: "{{ matrix_systemd_path }}"
|
|
|
|
patterns: "matrix-synapse-worker.*.service"
|
|
|
|
use_regex: true
|
|
|
|
register: matrix_synapse_workers_current_systemd_services
|
2020-10-23 18:49:53 +00:00
|
|
|
|
2021-01-25 10:14:46 +00:00
|
|
|
- name: Ensure previous worker systemd services are cleaned
|
|
|
|
file:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
state: absent
|
|
|
|
with_items: "{{ matrix_synapse_workers_current_systemd_services.files }}"
|
2020-10-23 18:49:53 +00:00
|
|
|
|
2021-01-25 10:14:46 +00:00
|
|
|
- name: Ensure creation of worker systemd service files and configuration files
|
|
|
|
include_tasks: "{{ role_path }}/tasks/workers/util/setup_files_for_worker.yml"
|
|
|
|
with_items: "{{ matrix_synapse_workers_enabled_list }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: matrix_synapse_worker_details
|