refactor based on Slavi's requests
This commit is contained in:
@ -2,11 +2,13 @@
|
||||
# See: https://github.com/matrix-org/synapse
|
||||
|
||||
matrix_synapse_enabled: true
|
||||
matrix_synapse_self_build: false
|
||||
|
||||
matrix_synapse_docker_image: "matrixdotorg/synapse:v1.11.1"
|
||||
matrix_synapse_docker_image_force_pull: "{{ matrix_synapse_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_synapse_base_path: "{{ matrix_base_data_path }}/synapse"
|
||||
matrix_docker_synapse_src_files_path: "{{ matrix_synapse_base_path }}/docker-src"
|
||||
matrix_synapse_config_dir_path: "{{ matrix_synapse_base_path }}/config"
|
||||
matrix_synapse_run_path: "{{ matrix_synapse_base_path }}/run"
|
||||
matrix_synapse_storage_path: "{{ matrix_synapse_base_path }}/storage"
|
||||
|
@ -11,6 +11,7 @@
|
||||
- "{{ matrix_synapse_config_dir_path }}"
|
||||
- "{{ matrix_synapse_run_path }}"
|
||||
- "{{ matrix_synapse_ext_path }}"
|
||||
- { src: "{{ matrix_docker_synapse_src_files_path }}", when: "{{ matrix_synapse_self_build }}" }
|
||||
# We handle matrix_synapse_media_store_path elsewhere (in ./synapse/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.
|
||||
|
@ -18,15 +18,15 @@
|
||||
group: "{{ matrix_user_username }}"
|
||||
when: "not local_path_media_store_stat.failed and not local_path_media_store_stat.stat.exists"
|
||||
|
||||
- name: Ensure Synapse repository is present on Raspberry pi
|
||||
- name: Ensure Synapse repository is present on self-build
|
||||
git:
|
||||
repo: https://github.com/matrix-org/synapse.git
|
||||
dest: "{{ matrix_docker_synapse_src_files_path }}"
|
||||
version: "{{ matrix_synapse_docker_image.split(':')[1] }}"
|
||||
force: "yes"
|
||||
when: "matrix_raspberry_pi"
|
||||
when: "matrix_synapse_self_build"
|
||||
|
||||
- name: Ensure Synapse Docker image is build (Raspberry pi)
|
||||
- name: Ensure Synapse Docker image is build
|
||||
docker_image:
|
||||
name: "{{ matrix_synapse_docker_image }}"
|
||||
source: build
|
||||
@ -34,7 +34,7 @@
|
||||
dockerfile: docker/Dockerfile
|
||||
path: "{{ matrix_docker_synapse_src_files_path }}"
|
||||
pull: yes
|
||||
when: "matrix_raspberry_pi"
|
||||
when: "matrix_synapse_self_build"
|
||||
|
||||
- name: Ensure Synapse Docker image is pulled
|
||||
docker_image:
|
||||
@ -42,7 +42,7 @@
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_synapse_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
||||
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_synapse_docker_image_force_pull }}"
|
||||
when: "not matrix_raspberry_pi"
|
||||
when: "not matrix_synapse_self_build"
|
||||
|
||||
- name: Check if a Synapse signing key exists
|
||||
stat:
|
||||
|
Reference in New Issue
Block a user