Add service priorities - try to stop/start them in an optimal order
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
state: stopped
|
||||
enabled: false
|
||||
with_items: "{{ matrix_synapse_workers_current_systemd_services.files }}"
|
||||
when: "not ansible_check_mode and item.path | basename not in matrix_systemd_services_list"
|
||||
when: "not ansible_check_mode and item.path | basename not in matrix_systemd_services_list | map(attribute='name')"
|
||||
|
||||
- name: Ensure unnecessary worker systemd services are cleaned
|
||||
ansible.builtin.file:
|
||||
|
@ -53,7 +53,7 @@
|
||||
when: "'replication_port' not in matrix_synapse_worker_details"
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + [matrix_synapse_worker_details.name + '.service'] }}"
|
||||
matrix_systemd_services_list_auto: "{{ matrix_systemd_services_list_auto + [{'name': (matrix_synapse_worker_details.name + '.service'), 'priority': 1100}] }}"
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_synapse_webserving_workers_systemd_services_list: "{{ matrix_synapse_webserving_workers_systemd_services_list + [matrix_synapse_worker_details.name + '.service'] }}"
|
||||
|
Reference in New Issue
Block a user