From c71087d15d809ac47887c929728a15afae63bd0a Mon Sep 17 00:00:00 2001 From: QEDeD Date: Mon, 19 Oct 2026 08:16:31 +0200 Subject: [PATCH] Load Element and SchildiChat themes in a stable order (#5660) --- roles/custom/matrix-client-element/tasks/prepare_themes.yml | 3 ++- .../custom/matrix-client-schildichat/tasks/prepare_themes.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/custom/matrix-client-element/tasks/prepare_themes.yml b/roles/custom/matrix-client-element/tasks/prepare_themes.yml index 133c8a803..fc70444ee 100644 --- a/roles/custom/matrix-client-element/tasks/prepare_themes.yml +++ b/roles/custom/matrix-client-element/tasks/prepare_themes.yml @@ -38,7 +38,8 @@ ansible.builtin.slurp: path: "{{ item.path }}" register: "matrix_client_element_theme_file_contents" - with_items: "{{ matrix_client_element_theme_file_list.files }}" + # `find` lists files in filesystem order, which can differ between checkouts. Sorting keeps the generated `config.json` the same, so the service is not restarted needlessly. + with_items: "{{ matrix_client_element_theme_file_list.files | sort(attribute='path', case_sensitive=true) }}" - name: Load Element Web theme ansible.builtin.set_fact: diff --git a/roles/custom/matrix-client-schildichat/tasks/prepare_themes.yml b/roles/custom/matrix-client-schildichat/tasks/prepare_themes.yml index 0402e4bba..2ed90aaa0 100644 --- a/roles/custom/matrix-client-schildichat/tasks/prepare_themes.yml +++ b/roles/custom/matrix-client-schildichat/tasks/prepare_themes.yml @@ -37,7 +37,8 @@ ansible.builtin.slurp: path: "{{ item.path }}" register: "matrix_client_schildichat_theme_file_contents" - with_items: "{{ matrix_client_schildichat_theme_file_list.files }}" + # `find` lists files in filesystem order, which can differ between checkouts. Sorting keeps the generated `config.json` the same, so the service is not restarted needlessly. + with_items: "{{ matrix_client_schildichat_theme_file_list.files | sort(attribute='path', case_sensitive=true) }}" - name: Load SchildiChat Web theme ansible.builtin.set_fact: