matrix-docker-ansible-deploy/roles/custom/matrix-email2matrix/tasks/validate_config.yml
Suguru Hirahara ab53f163ee
Tribute to deprecated components: add license information to files for matrix-email2matrix
This commit adds copyright attirbutions in SPDX format to files for matrix-email2matrix, following the REUSE's specification. ".license" files are added for config.json.j2 and matrix-email2matrix.service.j2.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-02-25 02:08:39 +09:00

28 lines
1.0 KiB
YAML

# SPDX-FileCopyrightText: 2019 - 2024 Slavi Pantaleev
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
- name: Fail if no Email2Matrix mappings
ansible.builtin.fail:
msg: >
You need to define at least one mapping in `matrix_email2matrix_matrix_mappings` for enabling Email2Matrix.
when: "matrix_email2matrix_matrix_mappings | length == 0"
- name: Fail if required Email2Matrix settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] == ''"
with_items:
- {'name': 'matrix_email2matrix_container_network', when: true}
- name: (Deprecation) Catch and report renamed Email2Matrix variables
ansible.builtin.fail:
msg: >-
The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
when: "item.old in vars"
with_items:
- {'old': 'matrix_email2matrix_docker_image_name_prefix', 'new': 'matrix_email2matrix_docker_image_registry_prefix'}