2022-02-05 20:32:54 +00:00
|
|
|
---
|
2021-05-21 08:15:05 +00:00
|
|
|
|
2024-01-20 10:39:20 +00:00
|
|
|
# This validation task is here, not in validate_config.yml,
|
|
|
|
# because init.yml runs before it.
|
|
|
|
#
|
|
|
|
# validate_config.yml aims to validate the configuration based on the work we do,
|
|
|
|
# so we can't change the order.
|
|
|
|
- name: Fail when using the old (renamed) room-workers preset
|
|
|
|
ansible.builtin.fail:
|
|
|
|
msg: >-
|
|
|
|
The `room-workers` preset has been renamed to `specialized-workers`. Update your `matrix_synapse_workers_preset` variable to use the new name.
|
|
|
|
when: matrix_synapse_workers_preset == 'room-workers'
|
|
|
|
|
2021-02-15 09:25:35 +00:00
|
|
|
# Unless `matrix_synapse_workers_enabled_list` is explicitly defined,
|
|
|
|
# we'll generate it dynamically.
|
2022-11-24 14:27:11 +00:00
|
|
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/workers/init.yml"
|
2022-11-23 13:52:58 +00:00
|
|
|
when: "matrix_synapse_workers_enabled | bool and matrix_synapse_workers_enabled_list | length == 0"
|
2021-02-15 09:25:35 +00:00
|
|
|
|
2022-09-15 04:05:25 +00:00
|
|
|
- name: Ensure workers are injected into various places
|
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/workers/util/inject_worker.yml"
|
2021-01-25 10:14:46 +00:00
|
|
|
with_items: "{{ matrix_synapse_workers_enabled_list }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: matrix_synapse_worker_details
|
2022-11-23 13:52:58 +00:00
|
|
|
when: matrix_synapse_workers_enabled | bool
|