From 2211e678f39af4f6e0931bba834d090c5ce0a0f6 Mon Sep 17 00:00:00 2001 From: Sabine Laszakovits Date: Sun, 25 Oct 2020 21:01:25 +0100 Subject: [PATCH] fixed comments that were copied over from mautrix-telegram role --- .../defaults/main.yml | 15 +++--- .../tasks/init.yml | 47 ------------------- .../tasks/setup_install.yml | 17 ------- 3 files changed, 7 insertions(+), 72 deletions(-) diff --git a/roles/matrix-bridge-mautrix-signal/defaults/main.yml b/roles/matrix-bridge-mautrix-signal/defaults/main.yml index 2d61d2071..c15f1ed19 100644 --- a/roles/matrix-bridge-mautrix-signal/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-signal/defaults/main.yml @@ -1,5 +1,5 @@ -# mautrix-telegram is a Matrix <-> Telegram bridge -# See: https://github.com/tulir/mautrix-telegram +# mautrix-signal is a Matrix <-> Signal bridge +# See: https://github.com/tulir/mautrix-signal matrix_mautrix_signal_enabled: true @@ -17,9 +17,8 @@ matrix_mautrix_signal_daemon_path: "{{ matrix_mautrix_signal_base_path }}/signal matrix_mautrix_signal_homeserver_address: '' matrix_mautrix_signal_homeserver_domain: '' matrix_mautrix_signal_appservice_address: 'http://matrix-mautrix-signal:29328' -# matrix_mautrix_telegram_appservice_public_external: 'https://{{ matrix_server_fqn_matrix }}{{ matrix_mautrix_telegram_public_endpoint }}' -# Controls whether the matrix-mautrix-telegram container exposes its HTTP port (tcp/8080 in the container). +# Controls whether the matrix-mautrix-signal container exposes its port (tcp/29328 in the container). # # Takes an ":" or "" value (e.g. "127.0.0.1:9006"), or empty string to not expose. matrix_mautrix_signal_container_http_host_bind_port: '' @@ -59,23 +58,23 @@ matrix_mautrix_signal_login_shared_secret: '' # Default configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # -# For a more advanced customization, you can extend the default (see `matrix_mautrix_telegram_configuration_extension_yaml`) +# For a more advanced customization, you can extend the default (see `matrix_mautrix_signal_configuration_extension_yaml`) # or completely replace this variable with your own template. matrix_mautrix_signal_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}" matrix_mautrix_signal_configuration_extension_yaml: | # Your custom YAML configuration goes here. - # This configuration extends the default starting configuration (`matrix_mautrix_telegram_configuration_yaml`). + # This configuration extends the default starting configuration (`matrix_mautrix_signal_configuration_yaml`). # # You can override individual variables from the default configuration, or introduce new ones. # # If you need something more special, you can take full control by - # completely redefining `matrix_mautrix_telegram_configuration_yaml`. + # completely redefining `matrix_mautrix_signal_configuration_yaml`. matrix_mautrix_signal_configuration_extension: "{{ matrix_mautrix_signal_configuration_extension_yaml|from_yaml if matrix_mautrix_signal_configuration_extension_yaml|from_yaml is mapping else {} }}" # Holds the final configuration (a combination of the default and its extension). -# You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`. +# You most likely don't need to touch this variable. Instead, see `matrix_mautrix_signal_configuration_yaml`. matrix_mautrix_signal_configuration: "{{ matrix_mautrix_signal_configuration_yaml|from_yaml|combine(matrix_mautrix_signal_configuration_extension, recursive=True) }}" matrix_mautrix_signal_registration_yaml: "{{ lookup('template', 'templates/registration.yaml.j2') }}" diff --git a/roles/matrix-bridge-mautrix-signal/tasks/init.yml b/roles/matrix-bridge-mautrix-signal/tasks/init.yml index 8fdc98349..c2b37841c 100644 --- a/roles/matrix-bridge-mautrix-signal/tasks/init.yml +++ b/roles/matrix-bridge-mautrix-signal/tasks/init.yml @@ -14,50 +14,3 @@ + {{ ["/matrix-mautrix-signal-registration.yaml"] }} when: matrix_mautrix_signal_enabled|bool - -# - block: -# - name: Fail if matrix-nginx-proxy role already executed -# fail: -# msg: >- -# Trying to append Mautrix Signal's reverse-proxying configuration to matrix-nginx-proxy, -# but it's pointless since the matrix-nginx-proxy role had already executed. -# To fix this, please change the order of roles in your plabook, -# so that the matrix-nginx-proxy role would run after the matrix-bridge-mautrix-signal role. -# when: matrix_nginx_proxy_role_executed|default(False)|bool - - # - name: Generate Mautrix Signal proxying configuration for matrix-nginx-proxy - # set_fact: - # matrix_mautrix_telegram_matrix_nginx_proxy_configuration: | - # location {{ matrix_mautrix_telegram_public_endpoint }} { - # {% if matrix_nginx_proxy_enabled|default(False) %} - # {# Use the embedded DNS resolver in Docker containers to discover the service #} - # resolver 127.0.0.11 valid=5s; - # set $backend "matrix-mautrix-telegram:8080"; - # proxy_pass http://$backend; - # {% else %} - # {# Generic configuration for use outside of our container setup #} - # proxy_pass http://127.0.0.1:9006; - # {% endif %} - # } - - # - name: Register Mautrix Telegram proxying configuration with matrix-nginx-proxy - # set_fact: - # matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks: | - # {{ - # matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks|default([]) - # + - # [matrix_mautrix_telegram_matrix_nginx_proxy_configuration] - # }} - # tags: - # - always - # when: matrix_mautrix_telegram_enabled|bool - -# - name: Warn about reverse-proxying if matrix-nginx-proxy not used -# debug: -# msg: >- -# NOTE: You've enabled the Mautrix Telegram bridge but are not using the matrix-nginx-proxy -# reverse proxy. -# Please make sure that you're proxying the `{{ matrix_mautrix_telegram_public_endpoint }}` -# URL endpoint to the matrix-mautrix-telegram container. -# You can expose the container's port using the `matrix_mautrix_telegram_container_http_host_bind_port` variable. -# when: "matrix_mautrix_telegram_enabled|bool and matrix_nginx_proxy_enabled is not defined" diff --git a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml index cacb4c6c7..16b68d250 100644 --- a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml @@ -42,23 +42,6 @@ - "{{ matrix_mautrix_signal_daemon_path }}" - "{{ matrix_mautrix_signal_db_storage_path }}" -# - name: Check if an old database file already exists -# stat: -# path: "{{ matrix_mautrix_telegram_base_path }}/mautrix-telegram.db" -# register: matrix_mautrix_telegram_stat_database -# -# - name: (Data relocation) Ensure matrix-mautrix-telegram.service is stopped -# service: -# name: matrix-mautrix-telegram -# state: stopped -# daemon_reload: yes -# failed_when: false -# when: "matrix_mautrix_telegram_stat_database.stat.exists" -# -# - name: (Data relocation) Move mautrix-telegram database file to ./data directory -# command: "mv {{ matrix_mautrix_telegram_base_path }}/mautrix-telegram.db {{ matrix_mautrix_telegram_data_path }}/mautrix-telegram.db" -# when: "matrix_mautrix_telegram_stat_database.stat.exists" - - name: Ensure mautrix-signal config.yaml installed copy: content: "{{ matrix_mautrix_signal_configuration|to_nice_yaml }}"