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

53 行
1.8 KiB

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