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: