2018-08-17 08:02:12 +02:00
|
|
|
---
|
|
|
|
|
2019-04-23 09:20:56 +02:00
|
|
|
- name: Ensure Synapse paths exist
|
2022-07-18 09:39:08 +02:00
|
|
|
ansible.builtin.file:
|
2020-03-18 18:24:03 +02:00
|
|
|
path: "{{ item.path }}"
|
2018-08-17 08:02:12 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0750
|
|
|
|
owner: "{{ matrix_user_username }}"
|
2020-05-01 19:59:32 +02:00
|
|
|
group: "{{ matrix_user_groupname }}"
|
2018-08-17 08:02:12 +02:00
|
|
|
with_items:
|
2022-02-05 22:32:54 +02:00
|
|
|
- {path: "{{ matrix_synapse_config_dir_path }}", when: true}
|
|
|
|
- {path: "{{ matrix_synapse_ext_path }}", when: true}
|
2022-11-27 09:26:18 +02:00
|
|
|
- {path: "{{ matrix_synapse_bin_path }}", when: true}
|
2022-02-05 22:32:54 +02:00
|
|
|
- {path: "{{ matrix_synapse_docker_src_files_path }}", when: "{{ matrix_synapse_container_image_self_build }}"}
|
2022-10-14 15:33:19 +02:00
|
|
|
- {path: "{{ matrix_synapse_customized_docker_src_files_path }}", when: "{{ matrix_synapse_container_image_customizations_enabled }}"}
|
2022-10-14 16:41:41 +02:00
|
|
|
- {path: "{{ matrix_synapse_ext_s3_storage_provider_path }}", when: "{{ matrix_synapse_ext_synapse_s3_storage_provider_enabled }}"}
|
2019-05-21 03:46:49 +02:00
|
|
|
# We handle matrix_synapse_media_store_path elsewhere (in ./synapse/setup_install.yml),
|
Make it safer to override matrix_synapse_media_store_path
This is described in Github issue #58.
Until now, we had the variable, but if you redefined it, you'd run
into multiple problems:
- we actually always mounted some "storage" directory to the Synapse
container. So if your media store is not there, you're out of luck
- homeserver.yaml always hardcoded the path to the media store,
as a directory called "media-store" inside the storage directory.
Relocating to outside the storage directory was out of the question.
Moreover, even if you had simply renamed the media store directory
(e.g. "media-store" -> "media_store"), it would have also caused trouble.
With this patch, we mount the media store's parent to the Synapse container.
This way, we don't care where the media store is (inside storage or
not). We also don't assume (anymore) that the final part of the path
is called "media-store" -- anything can be used.
The "storage" directory and variable (`matrix_synapse_storage_path`)
still remain for compatibility purposes. People who were previously
overriding `matrix_synapse_storage_path` can continue doing so
and their media store will be at the same place.
The playbook no longer explicitly creates the `matrix_synapse_storage_path` directory
though. It's not necessary. If the media store is specified to be within it, it will
get created when the media store directory is created by the playbook.
2018-12-20 13:39:01 +02:00
|
|
|
# because if it's using Goofys and it's already mounted (from before),
|
2019-04-23 09:20:56 +02:00
|
|
|
# trying to chown/chmod it here will cause trouble.
|
2022-11-24 16:27:11 +02:00
|
|
|
when: item.when | bool
|
2019-05-21 03:46:49 +02:00
|
|
|
|
2022-11-24 16:27:11 +02:00
|
|
|
- block:
|
|
|
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/setup_install.yml"
|
2019-05-21 03:46:49 +02:00
|
|
|
|
2022-11-24 16:27:11 +02:00
|
|
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/setup_uninstall.yml"
|
|
|
|
tags:
|
|
|
|
- setup-all
|
|
|
|
- setup-synapse
|
2020-04-10 23:44:53 +02:00
|
|
|
|
2022-11-24 16:27:11 +02:00
|
|
|
- block:
|
|
|
|
- when: matrix_synapse_workers_enabled | bool
|
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/workers/setup_install.yml"
|
|
|
|
tags:
|
|
|
|
- setup-all
|
|
|
|
- setup-synapse
|
2019-05-21 03:46:49 +02:00
|
|
|
|
2022-11-24 16:27:11 +02:00
|
|
|
- block:
|
|
|
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/setup_install.yml"
|
|
|
|
tags:
|
|
|
|
- setup-all
|
|
|
|
- setup-synapse
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- when: matrix_s3_media_store_enabled | bool
|
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/goofys/setup_install.yml"
|
|
|
|
|
|
|
|
- when: not matrix_s3_media_store_enabled | bool
|
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/goofys/setup_uninstall.yml"
|
|
|
|
tags:
|
|
|
|
- setup-all
|
|
|
|
- setup-synapse
|