From b8718a23a529c2f67e6b843d5a66c587415652a4 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 6 Dec 2025 08:14:03 +0100 Subject: [PATCH] fix: improve condition checks for Proxmox snippets storage configuration --- tasks/preflight-checks.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/preflight-checks.yml b/tasks/preflight-checks.yml index c58bb2a..58164d4 100644 --- a/tasks/preflight-checks.yml +++ b/tasks/preflight-checks.yml @@ -174,8 +174,9 @@ regexp: "(?m)(^storage {{ proxmox_snippets_storage }}.*?content\\s*=\\s*)([^\n]+)" replace: >- \1{{ ( '\2'.split(',') | union(['snippets']) ) | join(',') }} - when: storage_cfg is search("storage {{ proxmox_snippets_storage }}") and - storage_cfg is search("storage {{ proxmox_snippets_storage }}.*content=") + when: + - storage_cfg is search("storage " + proxmox_snippets_storage) + - storage_cfg is search("storage " + proxmox_snippets_storage + ".*content=") - name: "[PREFLIGHT] Ensure snippets storage exists" ansible.builtin.file: