From 32430de812ec01e6a889552522b85791a8075afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 5 Aug 2022 19:02:01 +0200 Subject: [PATCH] Fix bug that prevented user with external nginx from launch (#2003) * Fix bug that prevented user with external nginx from launch The backslash was missing and prevented users from starting the bot * Add necessary config for ext nginx to docs * Add automatic config for ext nginx, adjust docs * Remove unneeded and possibly puzzeling documentation --- docs/configuring-playbook-bot-maubot.md | 7 ------- group_vars/matrix_servers | 2 ++ .../templates/systemd/matrix-bot-maubot.service.j2 | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/configuring-playbook-bot-maubot.md b/docs/configuring-playbook-bot-maubot.md index d74cfb2f..d5990a11 100644 --- a/docs/configuring-playbook-bot-maubot.md +++ b/docs/configuring-playbook-bot-maubot.md @@ -61,10 +61,3 @@ You can expand "Access token" to copy it. ![Obatining an admin access token with Element](assets/obtain_admin_access_token_element.png) **IMPORTANT**: once you copy the token, just close the Matrix client window/tab. Do not "log out", as that would invalidate the token. - - - - - - - diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 52f89cec..a89e2e9b 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1125,6 +1125,8 @@ matrix_bot_maubot_registration_shared_secret: |- }[matrix_homeserver_implementation] }} +matrix_bot_maubot_management_interface_http_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_bot_maubot_management_interface_port | string) }}" + # Postgres is the default, except if not using `matrix_postgres` (internal postgres) matrix_bot_maubot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}" matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}" diff --git a/roles/matrix-bot-maubot/templates/systemd/matrix-bot-maubot.service.j2 b/roles/matrix-bot-maubot/templates/systemd/matrix-bot-maubot.service.j2 index c4cbcb38..a9e03986 100644 --- a/roles/matrix-bot-maubot/templates/systemd/matrix-bot-maubot.service.j2 +++ b/roles/matrix-bot-maubot/templates/systemd/matrix-bot-maubot.service.j2 @@ -28,7 +28,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-maubot \ {% endfor %} --network={{ matrix_docker_network }} \ {% if matrix_bot_maubot_management_interface_http_bind_port %} - -p {{ matrix_bot_maubot_management_interface_http_bind_port }}:{{ matrix_bot_maubot_management_interface_port }} + -p {{ matrix_bot_maubot_management_interface_http_bind_port }}:{{ matrix_bot_maubot_management_interface_port }} \ {% endif %} {{ matrix_bot_maubot_docker_image }} \ python3 -m maubot -c /config/config.yaml --no-update