Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

48 linhas
1.6 KiB

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