diff --git a/roles/matrix-base/defaults/main.yml b/roles/matrix-base/defaults/main.yml index f9d88c21e..a9fd62242 100644 --- a/roles/matrix-base/defaults/main.yml +++ b/roles/matrix-base/defaults/main.yml @@ -28,6 +28,7 @@ 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" diff --git a/roles/matrix-base/tasks/setup_matrix_base.yml b/roles/matrix-base/tasks/setup_matrix_base.yml index b8384dea3..77665f6bb 100644 --- a/roles/matrix-base/tasks/setup_matrix_base.yml +++ b/roles/matrix-base/tasks/setup_matrix_base.yml @@ -24,6 +24,7 @@ - "{{ 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 }}"} diff --git a/roles/matrix-riot-web/tasks/setup_riot_web.yml b/roles/matrix-riot-web/tasks/setup_riot_web.yml index a3e1048f9..fcaaeeec4 100644 --- a/roles/matrix-riot-web/tasks/setup_riot_web.yml +++ b/roles/matrix-riot-web/tasks/setup_riot_web.yml @@ -19,7 +19,25 @@ 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 + when: matrix_riot_web_enabled|bool and not matrix_raspberry_pi + +- name: Ensure Riot Web repository is present on Raspberry pi + 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" + +- name: Ensure Riot Web Docker image is build (Raspberry pi) + docker_image: + name: "{{ matrix_riot_web_docker_image }}" + source: build + build: + dockerfile: Dockerfile + path: "{{ matrix_docker_riot_web_src_files_path }}" + pull: yes + when: "matrix_riot_web_enabled|bool and matrix_raspberry_pi" - name: Ensure Matrix riot-web configuration installed copy: