From 9f6e8f5eaf2fd19200fb6533f4e524f32dffc892 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 18 Dec 2021 13:37:43 +0200 Subject: [PATCH] Remove matrix_s3 references from matrix-dendrite role All the `matrix_s3_*` stuff happens in the `matrix-synapse` role. If we are to have such S3 support for Dendrite, we should probably extract it out of the `matrix-synapse` role (into a `matrix-s3` role or `matrix-goofys`, etc.) and wire `matrix-dendrite` accordingly. This may or may not be done in the future though. For now, I'm cleaning things up in the `matrix-dendrite` role. --- roles/matrix-dendrite/tasks/init.yml | 4 ---- roles/matrix-dendrite/tasks/setup_dendrite.yml | 5 +---- .../templates/dendrite/systemd/matrix-dendrite.service.j2 | 6 ------ 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/roles/matrix-dendrite/tasks/init.yml b/roles/matrix-dendrite/tasks/init.yml index 28709469..2e2e551a 100644 --- a/roles/matrix-dendrite/tasks/init.yml +++ b/roles/matrix-dendrite/tasks/init.yml @@ -1,7 +1,3 @@ - set_fact: matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dendrite.service'] }}" when: matrix_dendrite_enabled|bool - -- set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-goofys.service'] }}" - when: matrix_s3_media_store_enabled|bool diff --git a/roles/matrix-dendrite/tasks/setup_dendrite.yml b/roles/matrix-dendrite/tasks/setup_dendrite.yml index 9fa8f566..04c3a7fe 100644 --- a/roles/matrix-dendrite/tasks/setup_dendrite.yml +++ b/roles/matrix-dendrite/tasks/setup_dendrite.yml @@ -9,9 +9,6 @@ with_items: - { path: "{{ matrix_dendrite_config_dir_path }}", when: true } - { path: "{{ matrix_dendrite_ext_path }}", when: true } - # We handle matrix_dendrite_media_store_path elsewhere (in ./dendrite/setup_install.yml), - # because if it's using Goofys and it's already mounted (from before), - # trying to chown/chmod it here will cause trouble. - when: "(matrix_dendrite_enabled|bool or matrix_s3_media_store_enabled|bool) and item.when" + when: "matrix_dendrite_enabled|bool and item.when" - import_tasks: "{{ role_path }}/tasks/dendrite/setup.yml" diff --git a/roles/matrix-dendrite/templates/dendrite/systemd/matrix-dendrite.service.j2 b/roles/matrix-dendrite/templates/dendrite/systemd/matrix-dendrite.service.j2 index 48067c0e..647d0756 100644 --- a/roles/matrix-dendrite/templates/dendrite/systemd/matrix-dendrite.service.j2 +++ b/roles/matrix-dendrite/templates/dendrite/systemd/matrix-dendrite.service.j2 @@ -15,12 +15,6 @@ Type=simple Environment="HOME={{ matrix_systemd_unit_home_path }}" ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-dendrite ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-dendrite -{% if matrix_s3_media_store_enabled %} -# Allow for some time before starting, so that media store can mount. -# Mounting can happen later too, but if we start writing, -# we'd write files to the local filesystem and fusermount will complain. -ExecStartPre={{ matrix_host_command_sleep }} 3 -{% endif %} ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-dendrite \ --log-driver=none \