fixed comments that were copied over from mautrix-telegram role

development
Sabine Laszakovits 4 years ago
parent e59aa07b86
commit 2211e678f3

@ -1,5 +1,5 @@
# mautrix-telegram is a Matrix <-> Telegram bridge # mautrix-signal is a Matrix <-> Signal bridge
# See: https://github.com/tulir/mautrix-telegram # See: https://github.com/tulir/mautrix-signal
matrix_mautrix_signal_enabled: true 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_address: ''
matrix_mautrix_signal_homeserver_domain: '' matrix_mautrix_signal_homeserver_domain: ''
matrix_mautrix_signal_appservice_address: 'http://matrix-mautrix-signal:29328' 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 "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9006"), or empty string to not expose. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9006"), or empty string to not expose.
matrix_mautrix_signal_container_http_host_bind_port: '' 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. # Default configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it. # 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. # or completely replace this variable with your own template.
matrix_mautrix_signal_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}" matrix_mautrix_signal_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
matrix_mautrix_signal_configuration_extension_yaml: | matrix_mautrix_signal_configuration_extension_yaml: |
# Your custom YAML configuration goes here. # 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. # 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 # 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 {} }}" 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). # 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_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') }}" matrix_mautrix_signal_registration_yaml: "{{ lookup('template', 'templates/registration.yaml.j2') }}"

@ -14,50 +14,3 @@
+ +
{{ ["/matrix-mautrix-signal-registration.yaml"] }} {{ ["/matrix-mautrix-signal-registration.yaml"] }}
when: matrix_mautrix_signal_enabled|bool 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"

@ -42,23 +42,6 @@
- "{{ matrix_mautrix_signal_daemon_path }}" - "{{ matrix_mautrix_signal_daemon_path }}"
- "{{ matrix_mautrix_signal_db_storage_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 - name: Ensure mautrix-signal config.yaml installed
copy: copy:
content: "{{ matrix_mautrix_signal_configuration|to_nice_yaml }}" content: "{{ matrix_mautrix_signal_configuration|to_nice_yaml }}"

Loading…
Cancel
Save