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.
 
 

55 lines
2.2 KiB

  1. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. # We install this into Synapse by making `matrix_synapse_ext_synapse_s3_storage_provider_enabled` influence other variables:
  6. # - `matrix_synapse_media_storage_providers` (via `matrix_synapse_media_storage_providers_auto`)
  7. # - `matrix_synapse_container_image_customizations_enabled`
  8. # - `matrix_synapse_container_image_customizations_s3_storage_provider_installation_enabled`
  9. #
  10. # Below are additional tasks for setting up various helper scripts, etc.
  11. - name: Ensure s3-storage-provider paths exists
  12. ansible.builtin.file:
  13. path: "{{ item }}"
  14. state: directory
  15. mode: 0750
  16. owner: "{{ matrix_synapse_uid }}"
  17. group: "{{ matrix_synapse_gid }}"
  18. with_items:
  19. - "{{ matrix_synapse_ext_s3_storage_provider_base_path }}"
  20. - "{{ matrix_synapse_ext_s3_storage_provider_bin_path }}"
  21. - name: Ensure s3-storage-provider env file installed
  22. ansible.builtin.template:
  23. src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/env.j2"
  24. dest: "{{ matrix_synapse_ext_s3_storage_provider_base_path }}/env"
  25. mode: 0640
  26. - name: Ensure s3-storage-provider database.yaml file installed
  27. ansible.builtin.template:
  28. src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/database.yaml.j2"
  29. dest: "{{ matrix_synapse_ext_s3_storage_provider_data_path }}/database.yaml"
  30. mode: 0640
  31. - name: Ensure s3-storage-provider scripts installed
  32. ansible.builtin.template:
  33. src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/bin/{{ item }}.j2"
  34. dest: "{{ matrix_synapse_ext_s3_storage_provider_bin_path }}/{{ item }}"
  35. mode: 0750
  36. with_items:
  37. - shell
  38. - migrate
  39. - name: Ensure matrix-synapse-s3-storage-provider-migrate.service and timer are installed
  40. ansible.builtin.template:
  41. src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/systemd/{{ item }}.j2"
  42. dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ item }}"
  43. mode: 0644
  44. with_items:
  45. - matrix-synapse-s3-storage-provider-migrate.service
  46. - matrix-synapse-s3-storage-provider-migrate.timer
  47. register: matrix_synapse_s3_storage_provider_systemd_service_result