fix: improve condition checks for Proxmox snippets storage configuration

This commit is contained in:
2025-12-06 08:14:03 +01:00
parent 15325213ab
commit b8718a23a5

View File

@@ -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: