2022-10-14 14:41:41 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# We install this into Synapse by making `matrix_synapse_ext_synapse_s3_storage_provider_enabled` influence other variables:
|
|
|
|
# - `matrix_synapse_media_storage_providers` (via `matrix_synapse_media_storage_providers_auto`)
|
|
|
|
# - `matrix_synapse_container_image_customizations_enabled`
|
|
|
|
# - `matrix_synapse_container_image_customizations_s3_storage_provider_installation_enabled`
|
|
|
|
#
|
|
|
|
# Below are additional tasks for setting up various helper scripts, etc.
|
|
|
|
|
2022-11-27 07:34:46 +00:00
|
|
|
- name: Ensure s3-storage-provider paths exists
|
2022-10-14 14:41:41 +00:00
|
|
|
ansible.builtin.file:
|
2022-11-27 07:34:46 +00:00
|
|
|
path: "{{ item }}"
|
2022-10-14 14:41:41 +00:00
|
|
|
state: directory
|
|
|
|
mode: 0750
|
2023-02-17 15:16:50 +00:00
|
|
|
owner: "{{ matrix_synapse_uid }}"
|
|
|
|
group: "{{ matrix_synapse_gid }}"
|
2022-11-27 07:34:46 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ matrix_synapse_ext_s3_storage_provider_base_path }}"
|
|
|
|
- "{{ matrix_synapse_ext_s3_storage_provider_bin_path }}"
|
|
|
|
|
|
|
|
- name: Ensure s3-storage-provider env file installed
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/env.j2"
|
|
|
|
dest: "{{ matrix_synapse_ext_s3_storage_provider_base_path }}/env"
|
|
|
|
mode: 0640
|
2022-10-14 14:41:41 +00:00
|
|
|
|
|
|
|
- name: Ensure s3-storage-provider database.yaml file installed
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/database.yaml.j2"
|
2022-12-04 08:17:55 +00:00
|
|
|
dest: "{{ matrix_synapse_ext_s3_storage_provider_data_path }}/database.yaml"
|
2022-10-14 14:41:41 +00:00
|
|
|
mode: 0640
|
|
|
|
|
|
|
|
- name: Ensure s3-storage-provider scripts installed
|
|
|
|
ansible.builtin.template:
|
2022-11-27 07:34:46 +00:00
|
|
|
src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/bin/{{ item }}.j2"
|
|
|
|
dest: "{{ matrix_synapse_ext_s3_storage_provider_bin_path }}/{{ item }}"
|
2022-10-14 14:41:41 +00:00
|
|
|
mode: 0750
|
|
|
|
with_items:
|
2022-11-27 07:34:46 +00:00
|
|
|
- shell
|
|
|
|
- migrate
|
2022-10-14 14:41:41 +00:00
|
|
|
|
|
|
|
- name: Ensure matrix-synapse-s3-storage-provider-migrate.service and timer are installed
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ role_path }}/templates/synapse/ext/s3-storage-provider/systemd/{{ item }}.j2"
|
2022-11-04 14:38:38 +00:00
|
|
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ item }}"
|
2022-10-14 14:41:41 +00:00
|
|
|
mode: 0640
|
|
|
|
with_items:
|
|
|
|
- matrix-synapse-s3-storage-provider-migrate.service
|
|
|
|
- matrix-synapse-s3-storage-provider-migrate.timer
|
|
|
|
register: matrix_synapse_s3_storage_provider_systemd_service_result
|