Files
matrix-docker-ansible-deploy/roles/custom/matrix-bridge-beeper-line/tasks/validate_config.yml
T
2026-07-23 23:02:46 +07:00

27 lines
1.2 KiB
YAML

# SPDX-FileCopyrightText: 2026 MDAD project contributors
# SPDX-FileCopyrightText: 2026 Nikita Chernyi
#
# 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: []
- name: Fail if required beeper-line 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_beeper_line_appservice_token', when: true}
- {'name': 'matrix_bridge_beeper_line_homeserver_address', when: true}
- {'name': 'matrix_bridge_beeper_line_homeserver_token', when: true}
- {'name': 'matrix_bridge_beeper_line_database_hostname', when: "{{ matrix_bridge_beeper_line_database_engine == 'postgres' }}"}
- {'name': 'matrix_bridge_beeper_line_container_network', when: true}