From 928b21acf4c0e356409d72f819acde8ccd90dd4d Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 6 Feb 2024 07:23:56 +0200 Subject: [PATCH] Add variable-deprecation task for Buscarron Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3157 --- .../matrix-bot-buscarron/tasks/validate_config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/custom/matrix-bot-buscarron/tasks/validate_config.yml b/roles/custom/matrix-bot-buscarron/tasks/validate_config.yml index 0694a6578..0e968e55a 100644 --- a/roles/custom/matrix-bot-buscarron/tasks/validate_config.yml +++ b/roles/custom/matrix-bot-buscarron/tasks/validate_config.yml @@ -1,4 +1,15 @@ --- +- name: (Deprecation) Catch and report renamed Buscarron settings + ansible.builtin.fail: + msg: >- + Your configuration contains a variable, which now has a different name. + Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`). + when: "item.old in vars" + with_items: + - {'old': 'matrix_bot_buscarron_noencryption', 'new': ''} + - {'old': 'matrix_bot_buscarron_spam_hosts', 'new': ''} + - {'old': 'matrix_bot_buscarron_spam_emails', 'new': ''} + - {'old': 'matrix_bot_buscarron_spam_localparts', 'new': ''} - name: Fail if required Buscarron settings not defined ansible.builtin.fail: