Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

52 行
1.7 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. #
  6. # Tasks related to setting up Element Web themes
  7. #
  8. - when: matrix_client_element_themes_enabled | bool
  9. run_once: true
  10. delegate_to: 127.0.0.1
  11. become: false
  12. block:
  13. - name: Ensure Element Web themes repository is pulled
  14. ansible.builtin.git:
  15. repo: "{{ matrix_client_element_themes_repository_url }}"
  16. version: "{{ matrix_client_element_themes_repository_version }}"
  17. dest: "{{ role_path }}/files/scratchpad/themes"
  18. - name: Find all Element Web theme files
  19. ansible.builtin.find:
  20. paths: "{{ role_path }}/files/scratchpad/themes"
  21. patterns: "*.json"
  22. recurse: true
  23. register: matrix_client_element_theme_file_list
  24. - name: Read Element Web theme
  25. ansible.builtin.slurp:
  26. path: "{{ item.path }}"
  27. register: "matrix_client_element_theme_file_contents"
  28. with_items: "{{ matrix_client_element_theme_file_list.files }}"
  29. - name: Load Element Web theme
  30. ansible.builtin.set_fact:
  31. matrix_client_element_setting_defaults_custom_themes: "{{ matrix_client_element_setting_defaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming
  32. with_items: "{{ matrix_client_element_theme_file_contents.results }}"
  33. #
  34. # Tasks related to getting rid of Element Web themes (if it was previously enabled)
  35. #
  36. - name: Ensure Element Web themes repository is removed
  37. ansible.builtin.file:
  38. path: "{{ role_path }}/files/scratchpad/themes"
  39. state: absent
  40. run_once: true
  41. delegate_to: 127.0.0.1
  42. become: false
  43. when: "not matrix_client_element_themes_enabled | bool"