Files
matrix-docker-ansible-deploy/roles/custom/matrix-bridge-rustpush/tasks/validate_config.yml
T
Slavi Pantaleev bd2b13979a Remove now-unused Traefik labels support from the rustpush bridge
The metrics endpoint was the only thing this bridge ever routed through
Traefik. With it gone, the container was still labeled `traefik.enable=true`
without defining any router, which makes Traefik fall back to its default
rule and produce a router pointing at nothing. It was also joining the
reverse-proxy network for no reason.

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/5487
2026-08-04 17:07:07 +03:00

43 lines
3.4 KiB
YAML

# SPDX-FileCopyrightText: 2026 MDAD project contributors
# SPDX-FileCopyrightText: 2026 Jason LaGuidice
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
- name: (Deprecation) Catch and report renamed settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
with_items:
- {'old': 'matrix_bridge_rustpush_metrics_enabled', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_metrics_proxying_enabled', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_metrics_proxying_hostname', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_metrics_proxying_path_prefix', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_enabled', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_traefik_rule', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_traefik_priority', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_traefik_entrypoints', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_traefik_tls', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_traefik_tls_certResolver', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_middleware_basic_auth_enabled', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_middleware_basic_auth_users', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_enabled', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_docker_network', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_entrypoints', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_tls_certResolver', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- name: Fail if required RustPush settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
with_items:
- {'name': 'matrix_bridge_rustpush_appservice_token', when: true}
- {'name': 'matrix_bridge_rustpush_homeserver_address', when: true}
- {'name': 'matrix_bridge_rustpush_homeserver_token', when: true}
- {'name': 'matrix_bridge_rustpush_database_hostname', when: "{{ matrix_bridge_rustpush_database_engine == 'postgres' }}"}
- {'name': 'matrix_bridge_rustpush_container_network', when: true}