From 570c4121b7441e0f735df18200198406085fda11 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 26 Jul 2025 18:46:42 +0300 Subject: [PATCH] Make sure remaining `when` dict keys do not refer to variables directly, but open a Jinja block Most `when` dict keys already were done correctly, but these few weren't. ansible-core 2.19.0 reported the following errors for them: > [WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg. > [DEPRECATION WARNING]: The `bool` filter coerced invalid value 'variable_name' (str) to False. This feature will be removed from ansible-core version 2.23. --- roles/custom/matrix-bot-chatgpt/tasks/install.yml | 2 +- roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml | 2 +- roles/custom/matrix-cactus-comments/tasks/setup_install.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/custom/matrix-bot-chatgpt/tasks/install.yml b/roles/custom/matrix-bot-chatgpt/tasks/install.yml index ea22800d8..ff54aad3a 100644 --- a/roles/custom/matrix-bot-chatgpt/tasks/install.yml +++ b/roles/custom/matrix-bot-chatgpt/tasks/install.yml @@ -15,7 +15,7 @@ with_items: - {path: "{{ matrix_bot_chatgpt_config_path }}", when: true} - {path: "{{ matrix_bot_chatgpt_data_path }}", when: true} - - {path: "{{ matrix_bot_chatgpt_container_src_path }}", when: matrix_bot_chatgpt_container_image_self_build} + - {path: "{{ matrix_bot_chatgpt_container_src_path }}", when: "{{ matrix_bot_chatgpt_container_image_self_build }}"} when: "item.when | bool" - name: Ensure chatgpt environment variables file created diff --git a/roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml b/roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml index 85fe93862..8214a6372 100644 --- a/roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml +++ b/roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml @@ -66,7 +66,7 @@ with_items: - {path: "{{ matrix_postmoogle_config_path }}", when: true} - {path: "{{ matrix_postmoogle_data_path }}", when: true} - - {path: "{{ matrix_postmoogle_docker_src_files_path }}", when: matrix_postmoogle_container_image_self_build} + - {path: "{{ matrix_postmoogle_docker_src_files_path }}", when: "{{ matrix_postmoogle_container_image_self_build }}"} when: "item.when | bool" - name: Ensure postmoogle environment variables file created diff --git a/roles/custom/matrix-cactus-comments/tasks/setup_install.yml b/roles/custom/matrix-cactus-comments/tasks/setup_install.yml index bf5ee0789..f68b6dff2 100644 --- a/roles/custom/matrix-cactus-comments/tasks/setup_install.yml +++ b/roles/custom/matrix-cactus-comments/tasks/setup_install.yml @@ -16,7 +16,7 @@ with_items: - {path: "{{ matrix_cactus_comments_base_path }}", when: true} - {path: "{{ matrix_cactus_comments_container_tmp_path }}", when: true} - - {path: "{{ matrix_cactus_comments_docker_src_files_path }}", when: matrix_cactus_comments_container_image_self_build} + - {path: "{{ matrix_cactus_comments_docker_src_files_path }}", when: "{{ matrix_cactus_comments_container_image_self_build }}"} when: "item.when | bool" - name: Ensure matrix-cactus-comments environment file created