diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 51365d74f..5efde0c95 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -678,19 +678,3 @@ matrix_synapse_systemd_wanted_services_list: | # /matrix-synapse # ###################################################################### - - - -###################################################################### -# -# raspberry pi -# -###################################################################### - -matrix_raspberry_pi: "false" - -###################################################################### -# -# /raspberry pi -# -###################################################################### diff --git a/roles/matrix-base/defaults/main.yml b/roles/matrix-base/defaults/main.yml index a9fd62242..a58e3bc42 100644 --- a/roles/matrix-base/defaults/main.yml +++ b/roles/matrix-base/defaults/main.yml @@ -26,13 +26,6 @@ matrix_base_data_path: "/matrix" matrix_base_data_path_mode: "750" matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files" -matrix_docker_src_files_path: "{{ matrix_base_data_path }}/docker-src" -matrix_docker_synapse_src_files_path: "{{ matrix_docker_src_files_path }}/synapse" -matrix_docker_riot_web_src_files_path: "{{ matrix_docker_src_files_path }}/riot-web" -matrix_docker_coturn_src_files_path: "{{ matrix_docker_src_files_path }}/coturn" -matrix_docker_mxisd_src_files_path: "{{ matrix_docker_src_files_path }}/mxisd" -matrix_docker_mautrix_facebook_src_files_path: "{{ matrix_docker_src_files_path }}/mautrix-facebook" -matrix_docker_mautrix_hangouts_src_files_path: "{{ matrix_docker_src_files_path }}/mautrix-hangouts" matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}" @@ -73,3 +66,6 @@ run_setup: true run_self_check: true run_start: true run_stop: true + +# Raspberry pi depoly TODO: it should be identified based on the operating system +matrix_raspberry_pi_deploy: false \ No newline at end of file diff --git a/roles/matrix-base/tasks/server_base/setup.yml b/roles/matrix-base/tasks/server_base/setup.yml index bd52a0e74..1ce62158f 100644 --- a/roles/matrix-base/tasks/server_base/setup.yml +++ b/roles/matrix-base/tasks/server_base/setup.yml @@ -7,7 +7,7 @@ when: (ansible_os_family == 'Debian') and (ansible_lsb.id != 'Raspbian') - include_tasks: "{{ role_path }}/tasks/server_base/setup_raspbian.yml" - when: "matrix_raspberry_pi" + when: "matrix_raspberry_pi_deploy" - name: Ensure Docker is started and autoruns service: diff --git a/roles/matrix-base/tasks/setup_matrix_base.yml b/roles/matrix-base/tasks/setup_matrix_base.yml index 77665f6bb..b4aa92b9a 100644 --- a/roles/matrix-base/tasks/setup_matrix_base.yml +++ b/roles/matrix-base/tasks/setup_matrix_base.yml @@ -22,13 +22,6 @@ group: "{{ matrix_user_username }}" with_items: - "{{ matrix_base_data_path }}" - - { src: "{{ matrix_docker_src_files_path }}", when: "{{ matrix_raspberry_pi }}" } - - { src: "{{ matrix_docker_synapse_src_files_path }}", when: "{{ matrix_raspberry_pi }}" } - - { src: "{{ matrix_docker_riot_web_src_files_path }}", when: "{{ matrix_raspberry_pi }}" } - - { src: "{{ matrix_docker_coturn_src_files_path }}", when: "{{ matrix_coturn_enabled }}"} - - { src: "{{ matrix_docker_mxisd_src_files_path }}", when: "{{ matrix_mxisd_enabled }}"} - - { src: "{{ matrix_docker_mautrix_facebook_src_files_path }}", when: "{{ matrix_mautrix_facebook_enabled }}"} - - { src: "{{ matrix_docker_mautrix_hangouts_src_files_path }}", when: "{{ matrix_mautrix_hangouts_enabled }}"} # `docker_network` doesn't work as expected when the given network # is a substring of a network that already exists. diff --git a/roles/matrix-bridge-mautrix-facebook/defaults/main.yml b/roles/matrix-bridge-mautrix-facebook/defaults/main.yml index bf57e9260..6503a2754 100644 --- a/roles/matrix-bridge-mautrix-facebook/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-facebook/defaults/main.yml @@ -2,6 +2,7 @@ # See: https://github.com/tulir/mautrix-facebook matrix_mautrix_facebook_enabled: true +matrix_mautrix_facebook_self_build: false # See: https://mau.dev/tulir/mautrix-facebook/container_registry matrix_mautrix_facebook_docker_image: "dock.mau.dev/tulir/mautrix-facebook:latest" @@ -10,6 +11,7 @@ matrix_mautrix_facebook_docker_image_force_pull: "{{ matrix_mautrix_facebook_doc matrix_mautrix_facebook_base_path: "{{ matrix_base_data_path }}/mautrix-facebook" matrix_mautrix_facebook_config_path: "{{ matrix_mautrix_facebook_base_path }}/config" matrix_mautrix_facebook_data_path: "{{ matrix_mautrix_facebook_base_path }}/data" +matrix_docker_mautrix_facebook_src_files_path: "{{ matrix_mautrix_facebook_base_path }}/docker-src" matrix_mautrix_facebook_homeserver_address: 'http://matrix-synapse:8008' matrix_mautrix_facebook_homeserver_domain: '{{ matrix_domain }}' diff --git a/roles/matrix-bridge-mautrix-facebook/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-facebook/tasks/setup_install.yml index a8c7cdf1a..7b83ae4ea 100644 --- a/roles/matrix-bridge-mautrix-facebook/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-facebook/tasks/setup_install.yml @@ -14,25 +14,7 @@ source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_mautrix_facebook_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_mautrix_facebook_docker_image_force_pull }}" - when: matrix_mautrix_facebook_enabled|bool and not matrix_raspberry_pi - -- name: Ensure Mautrix Facebook repository is present on Raspberry pi - git: - repo: https://github.com/tulir/mautrix-facebook.git - dest: "{{ matrix_docker_mautrix_facebook_src_files_path }}" -# version: "{{ matrix_coturn_docker_image.split(':')[1] }}" - force: "yes" - when: "matrix_mautrix_facebook_enabled|bool and matrix_raspberry_pi" - -- name: Ensure Mautrix Facebook Docker image is build (Raspberry pi) - docker_image: - name: "{{ matrix_mautrix_facebook_docker_image }}" - source: build - build: - dockerfile: Dockerfile - path: "{{ matrix_docker_mautrix_facebook_src_files_path }}" - pull: yes - when: "matrix_mautrix_facebook_enabled|bool and matrix_raspberry_pi" + when: matrix_mautrix_facebook_enabled|bool and not matrix_mautrix_facebook_self_build - name: Ensure Mautrix Facebook paths exist file: @@ -45,6 +27,25 @@ - "{{ matrix_mautrix_facebook_base_path }}" - "{{ matrix_mautrix_facebook_config_path }}" - "{{ matrix_mautrix_facebook_data_path }}" + - { src: "{{ matrix_docker_mautrix_facebook_src_files_path }}", when: "{{ matrix_mautrix_facebook_self_build }}" } + +- name: Ensure Mautrix Facebook repository is present on self-build + git: + repo: https://github.com/tulir/mautrix-facebook.git + dest: "{{ matrix_docker_mautrix_facebook_src_files_path }}" +# version: "{{ matrix_coturn_docker_image.split(':')[1] }}" + force: "yes" + when: "matrix_mautrix_facebook_enabled|bool and matrix_mautrix_facebook_self_build" + +- name: Ensure Mautrix Facebook Docker image is build + docker_image: + name: "{{ matrix_mautrix_facebook_docker_image }}" + source: build + build: + dockerfile: Dockerfile + path: "{{ matrix_docker_mautrix_facebook_src_files_path }}" + pull: yes + when: "matrix_mautrix_facebook_enabled|bool and matrix_mautrix_facebook_self_build" - name: Check if an old database file already exists stat: diff --git a/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml b/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml index fdb2c6390..e136dd1ed 100644 --- a/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml @@ -2,6 +2,7 @@ # See: https://github.com/tulir/mautrix-hangouts matrix_mautrix_hangouts_enabled: true +matrix_mautrix_hangouts_self_build: true # See: https://mau.dev/tulir/mautrix-hangouts/container_registry matrix_mautrix_hangouts_docker_image: "dock.mau.dev/tulir/mautrix-hangouts:latest" @@ -10,6 +11,7 @@ matrix_mautrix_hangouts_docker_image_force_pull: "{{ matrix_mautrix_hangouts_doc matrix_mautrix_hangouts_base_path: "{{ matrix_base_data_path }}/mautrix-hangouts" matrix_mautrix_hangouts_config_path: "{{ matrix_mautrix_hangouts_base_path }}/config" matrix_mautrix_hangouts_data_path: "{{ matrix_mautrix_hangouts_base_path }}/data" +matrix_docker_mautrix_hangouts_src_files_path: "{{ matrix_mautrix_hangouts_base_path }}/docker-src" matrix_mautrix_hangouts_public_endpoint: '/mautrix-hangouts' diff --git a/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml index 90206fd67..4a5c91038 100644 --- a/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml @@ -14,24 +14,7 @@ source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_mautrix_hangouts_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_mautrix_hangouts_docker_image_force_pull }}" - when: matrix_mautrix_hangouts_enabled|bool and not matrix_raspberry_pi - -- name: Ensure Mautrix Hangots repository is present on Raspberry pi - git: - repo: https://github.com/tulir/mautrix-hangouts.git - dest: "{{ matrix_docker_mautrix_hangouts_src_files_path }}" - force: "yes" - when: "matrix_mautrix_hangouts_enabled|bool and matrix_raspberry_pi" - -- name: Ensure Mautrix Hangouts Docker image is build (Raspberry pi) - docker_image: - name: "{{ matrix_mautrix_hangouts_docker_image }}" - source: build - build: - dockerfile: Dockerfile - path: "{{ matrix_docker_mautrix_hangouts_src_files_path }}" - pull: yes - when: "matrix_mautrix_hangouts_enabled|bool and matrix_raspberry_pi" + when: matrix_mautrix_hangouts_enabled|bool and not matrix_mautrix_hangouts_self_build - name: Ensure Mautrix Hangouts paths exist file: @@ -44,6 +27,26 @@ - "{{ matrix_mautrix_hangouts_base_path }}" - "{{ matrix_mautrix_hangouts_config_path }}" - "{{ matrix_mautrix_hangouts_data_path }}" + - { src: "{{ matrix_docker_mautrix_hangouts_src_files_path }}", when: "{{ matrix_mautrix_hangouts_self_build }}" } + + when: matrix_mautrix_hangouts_enabled|bool and not matrix_mautrix_hangouts_self_build + +- name: Ensure Mautrix Hangots repository is present on self build + git: + repo: https://github.com/tulir/mautrix-hangouts.git + dest: "{{ matrix_docker_mautrix_hangouts_src_files_path }}" + force: "yes" + when: "matrix_mautrix_hangouts_enabled|bool and matrix_mautrix_hangouts_self_build" + +- name: Ensure Mautrix Hangouts Docker image is build + docker_image: + name: "{{ matrix_mautrix_hangouts_docker_image }}" + source: build + build: + dockerfile: Dockerfile + path: "{{ matrix_docker_mautrix_hangouts_src_files_path }}" + pull: yes + when: "matrix_mautrix_hangouts_enabled|bool and matrix_mautrix_hangouts_self_build" - name: Check if an old database file already exists stat: diff --git a/roles/matrix-coturn/defaults/main.yml b/roles/matrix-coturn/defaults/main.yml index 4bcbb2231..c6a021845 100644 --- a/roles/matrix-coturn/defaults/main.yml +++ b/roles/matrix-coturn/defaults/main.yml @@ -1,4 +1,5 @@ matrix_coturn_enabled: true +matrix_coturn_self_build: false matrix_coturn_docker_image: "instrumentisto/coturn:4.5.1.1" matrix_coturn_docker_image_force_pull: "{{ matrix_coturn_docker_image.endswith(':latest') }}" @@ -13,6 +14,7 @@ matrix_coturn_docker_image_force_pull: "{{ matrix_coturn_docker_image.endswith(' matrix_coturn_docker_network: "matrix-coturn" matrix_coturn_base_path: "{{ matrix_base_data_path }}/coturn" +matrix_docker_coturn_src_files_path: "{{ matrix_coturn_base_path }}/docker-src" matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf" # List of systemd services that matrix-coturn.service depends on diff --git a/roles/matrix-coturn/tasks/setup_coturn.yml b/roles/matrix-coturn/tasks/setup_coturn.yml index bdd7d774f..9a50859af 100644 --- a/roles/matrix-coturn/tasks/setup_coturn.yml +++ b/roles/matrix-coturn/tasks/setup_coturn.yml @@ -4,23 +4,34 @@ # Tasks related to setting up Coturn # +- name: Ensure Matrix Coturn path exists + file: + path: "{{ item }}" + state: directory + mode: 0750 + owner: "{{ matrix_user_username }}" + group: "{{ matrix_user_username }}" + with_items: + - { src: "{{ matrix_docker_coturn_src_files_path }}", when: "{{ matrix_coturn_self_build }}"} + when: matrix_riot_web_enabled|bool + - name: Ensure Coturn image is pulled docker_image: name: "{{ matrix_coturn_docker_image }}" source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_coturn_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_coturn_docker_image_force_pull }}" - when: matrix_coturn_enabled|bool and not matrix_raspberry_pi + when: matrix_coturn_enabled|bool and not matrix_coturn_self_build -- name: Ensure Coturn repository is present on Raspberry pi +- name: Ensure Coturn repository is present on self-build git: repo: https://github.com/instrumentisto/coturn-docker-image.git dest: "{{ matrix_docker_coturn_src_files_path }}" version: "{{ matrix_coturn_docker_image.split(':')[1] }}" force: "yes" - when: "matrix_coturn_enabled|bool and matrix_raspberry_pi" + when: "matrix_coturn_enabled|bool and matrix_coturn_self_build" -- name: Ensure Coturn Docker image is build (Raspberry pi) +- name: Ensure Coturn Docker image is build docker_image: name: "{{ matrix_coturn_docker_image }}" source: build @@ -28,7 +39,7 @@ dockerfile: Dockerfile path: "{{ matrix_docker_coturn_src_files_path }}" pull: yes - when: "matrix_coturn_enabled|bool and matrix_raspberry_pi" + when: "matrix_coturn_enabled|bool and matrix_coturn_self_build" - name: Ensure Coturn configuration path exists file: diff --git a/roles/matrix-mxisd/defaults/main.yml b/roles/matrix-mxisd/defaults/main.yml index 286839dab..b9bebb0b4 100644 --- a/roles/matrix-mxisd/defaults/main.yml +++ b/roles/matrix-mxisd/defaults/main.yml @@ -2,11 +2,13 @@ # See: https://github.com/kamax-matrix/mxisd matrix_mxisd_enabled: true +matrix_mxisd_self_build: false matrix_mxisd_docker_image: "kamax/mxisd:1.4.6" matrix_mxisd_docker_image_force_pull: "{{ matrix_mxisd_docker_image.endswith(':latest') }}" matrix_mxisd_base_path: "{{ matrix_base_data_path }}/mxisd" +matrix_docker_mxisd_src_files_path: "{{ matrix_mxisd_base_path }}/docker-src" matrix_mxisd_config_path: "{{ matrix_mxisd_base_path }}/config" matrix_mxisd_data_path: "{{ matrix_mxisd_base_path }}/data" diff --git a/roles/matrix-mxisd/tasks/setup_mxisd.yml b/roles/matrix-mxisd/tasks/setup_mxisd.yml index b01327223..b01abef3a 100644 --- a/roles/matrix-mxisd/tasks/setup_mxisd.yml +++ b/roles/matrix-mxisd/tasks/setup_mxisd.yml @@ -14,6 +14,7 @@ with_items: - "{{ matrix_mxisd_config_path }}" - "{{ matrix_mxisd_data_path }}" + - { src: "{{ matrix_docker_mxisd_src_files_path }}", when: "{{ matrix_mxisd_self_build }}"} when: matrix_mxisd_enabled|bool - name: Ensure mxisd image is pulled @@ -22,39 +23,29 @@ source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_mxisd_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_mxisd_docker_image_force_pull }}" - when: matrix_mxisd_enabled|bool and not matrix_raspberry_pi + when: matrix_mxisd_enabled|bool and not matrix_mxisd_self_build -- name: Ensure gradel is installed on Raspberry pi for building +- name: Ensure gradel is installed for self-building apt: name: - gradle state: present update_cache: yes - when: "matrix_mxisd_enabled|bool and matrix_raspberry_pi" + when: "matrix_mxisd_enabled|bool and matrix_mxisd_self_build" -- name: Ensure mxisd repository is present on Raspberry pi +- name: Ensure mxisd repository is present on self-build git: repo: https://github.com/kamax-matrix/mxisd.git dest: "{{ matrix_docker_mxisd_src_files_path }}" version: "v{{ matrix_mxisd_docker_image.split(':')[1] }}" force: "yes" - when: "matrix_mxisd_enabled|bool and matrix_raspberry_pi" + when: "matrix_mxisd_enabled|bool and matrix_mxisd_self_build" -# - name: Ensure mxisd Docker image is build (Raspberry pi) -# docker_image: -# name: "{{ matrix_mxisd_docker_image }}" -# source: build -# build: -# dockerfile: Dockerfile -# path: "{{ matrix_docker_mxisd_src_files_path }}" -# pull: yes -# when: "matrix_mxisd_enabled|bool and matrix_raspberry_pi" - -- name: Ensure mxisd Docker image is build (Raspberry pi) +- name: Ensure mxisd Docker image is build shell: "./gradlew dockerBuild" args: chdir: "{{ matrix_docker_mxisd_src_files_path }}" - when: "matrix_mxisd_enabled|bool and matrix_raspberry_pi" + when: "matrix_mxisd_enabled|bool and matrix_mxisd_self_build" - name: Ensure mxisd config installed copy: diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index e707a61a3..0a37c965b 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -1,9 +1,11 @@ matrix_riot_web_enabled: true +matrix_riot_web_self_build: false matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.12" matrix_riot_web_docker_image_force_pull: "{{ matrix_riot_web_docker_image.endswith(':latest') }}" matrix_riot_web_data_path: "{{ matrix_base_data_path }}/riot-web" +matrix_docker_riot_web_src_files_path: "{{ matrix_riot_web_data_path }}/docker-src" # Controls whether the matrix-riot-web container exposes its HTTP port (tcp/8080 in the container). # diff --git a/roles/matrix-riot-web/tasks/setup_riot_web.yml b/roles/matrix-riot-web/tasks/setup_riot_web.yml index fcaaeeec4..ef0ec91d6 100644 --- a/roles/matrix-riot-web/tasks/setup_riot_web.yml +++ b/roles/matrix-riot-web/tasks/setup_riot_web.yml @@ -6,11 +6,14 @@ - name: Ensure Matrix riot-web path exists file: - path: "{{ matrix_riot_web_data_path }}" + path: "{{ item }}" state: directory mode: 0750 owner: "{{ matrix_user_username }}" group: "{{ matrix_user_username }}" + with_items: + - "{{ matrix_riot_web_data_path }}" + - { src: "{{ matrix_docker_riot_web_src_files_path }}", when: "{{ matrix_riot_web_self_build }}" } when: matrix_riot_web_enabled|bool - name: Ensure riot-web Docker image is pulled @@ -19,17 +22,17 @@ source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_riot_web_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_riot_web_docker_image_force_pull }}" - when: matrix_riot_web_enabled|bool and not matrix_raspberry_pi + when: matrix_riot_web_enabled|bool and not matrix_riot_web_self_build -- name: Ensure Riot Web repository is present on Raspberry pi +- name: Ensure Riot Web repository is present on self-build git: repo: https://github.com/vector-im/riot-web.git dest: "{{ matrix_docker_riot_web_src_files_path }}" version: "v{{ matrix_riot_web_docker_image.split(':')[1] }}" force: "yes" - when: "matrix_riot_web_enabled|bool and matrix_raspberry_pi" + when: "matrix_riot_web_enabled|bool and matrix_riot_web_self_build" -- name: Ensure Riot Web Docker image is build (Raspberry pi) +- name: Ensure Riot Web Docker image is build docker_image: name: "{{ matrix_riot_web_docker_image }}" source: build @@ -37,7 +40,7 @@ dockerfile: Dockerfile path: "{{ matrix_docker_riot_web_src_files_path }}" pull: yes - when: "matrix_riot_web_enabled|bool and matrix_raspberry_pi" + when: "matrix_riot_web_enabled|bool and matrix_self_build" - name: Ensure Matrix riot-web configuration installed copy: diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index 05ad9126a..309d4396f 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -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" diff --git a/roles/matrix-synapse/tasks/setup_synapse.yml b/roles/matrix-synapse/tasks/setup_synapse.yml index b565a4d2d..c5d6beef2 100644 --- a/roles/matrix-synapse/tasks/setup_synapse.yml +++ b/roles/matrix-synapse/tasks/setup_synapse.yml @@ -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. diff --git a/roles/matrix-synapse/tasks/synapse/setup_install.yml b/roles/matrix-synapse/tasks/synapse/setup_install.yml index 33f04a288..2188b1bdd 100644 --- a/roles/matrix-synapse/tasks/synapse/setup_install.yml +++ b/roles/matrix-synapse/tasks/synapse/setup_install.yml @@ -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: