mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-27 03:18:31 +01:00
5ea6aa3e50
* intial commit * changed * Reorderd * merge old changes * added changes to matrix_servers * Remove duplicate discord * Update main.yml * added google message to configuring-playbook.md * Changed docs to add new changes * Changed bug? * Removed problem j2 values * Rename a service files * change how password hash string * Changed port number * Change how the local part works * Revert "Merge pull request #8 from shreyasajj/wsproxy" This reverts commitbb1b8fc67c
, reversing changes made tocce6ba5f9d
. --------- Co-authored-by: Shreyas Ajjarapu <github.tzarina@aleeas.com>
36 lines
1.8 KiB
YAML
36 lines
1.8 KiB
YAML
---
|
|
|
|
- name: Fail if matrix-nginx-proxy role already executed
|
|
ansible.builtin.fail:
|
|
msg: >-
|
|
Trying to append mautrix-gmessages-metrics'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 playbook,
|
|
so that the matrix-nginx-proxy role would run after the matrix-bridge-mautrix-gmessages role.
|
|
when: matrix_nginx_proxy_role_executed | default(False) | bool
|
|
|
|
- when: matrix_mautrix_gmessages_metrics_proxying_enabled | bool
|
|
block:
|
|
- name: Generate mautrix-gmessages metrics proxying configuration for matrix-nginx-proxy (matrix.DOMAIN/metrics/mautrix-gmessages)
|
|
ansible.builtin.set_fact:
|
|
matrix_mautrix_gmessages_nginx_metrics_configuration_block: |
|
|
location /metrics/mautrix-gmessages {
|
|
{% 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-gmessages:8001";
|
|
proxy_pass http://$backend/metrics;
|
|
{% else %}
|
|
return 404 "matrix-nginx-proxy is disabled and no host port was bound to the container, so metrics are unavailable";
|
|
{% endif %}
|
|
}
|
|
|
|
- name: Register mautrix-gmessages metrics proxying configuration with matrix-nginx-proxy (matrix.DOMAIN/metrics/mautrix-gmessages)
|
|
ansible.builtin.set_fact:
|
|
matrix_nginx_proxy_proxy_matrix_metrics_additional_system_location_configuration_blocks: |
|
|
{{
|
|
matrix_nginx_proxy_proxy_matrix_metrics_additional_system_location_configuration_blocks | default([])
|
|
+
|
|
[matrix_mautrix_gmessages_nginx_metrics_configuration_block]
|
|
}}
|