Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
1.3 KiB

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