From 40d0fea06c62938007d439124f0df7f823de0188 Mon Sep 17 00:00:00 2001 From: Horvath Gergely Date: Fri, 21 Feb 2020 18:27:26 +0100 Subject: [PATCH] add mautrix-hangouts support for raspberry pi --- roles/matrix-base/defaults/main.yml | 1 + roles/matrix-base/tasks/setup_matrix_base.yml | 1 + .../tasks/setup_install.yml | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/roles/matrix-base/defaults/main.yml b/roles/matrix-base/defaults/main.yml index b7e0681a..f9d88c21 100644 --- a/roles/matrix-base/defaults/main.yml +++ b/roles/matrix-base/defaults/main.yml @@ -31,6 +31,7 @@ matrix_docker_synapse_src_files_path: "{{ matrix_docker_src_files_path }}/synaps 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 }}" diff --git a/roles/matrix-base/tasks/setup_matrix_base.yml b/roles/matrix-base/tasks/setup_matrix_base.yml index 5823e39f..b8384dea 100644 --- a/roles/matrix-base/tasks/setup_matrix_base.yml +++ b/roles/matrix-base/tasks/setup_matrix_base.yml @@ -27,6 +27,7 @@ - { 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-hangouts/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml index 7f325165..90206fd6 100644 --- a/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-hangouts/tasks/setup_install.yml @@ -14,6 +14,24 @@ 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" - name: Ensure Mautrix Hangouts paths exist file: