fix 🐛: Ensure snippets storage is enabled
This commit updates the preflight task to correctly enable the 'snippets' storage in /etc/pve/storage.cfg. The change uses a more robust regular expression to handle potential variations in the storage configuration, ensuring the snippets feature is properly activated.
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
|
||||
- name: "[PREFLIGHT] Ensure 'snippets' is enabled for {{ proxmox_snippets_storage }}"
|
||||
ansible.builtin.replace:
|
||||
path: /etc/pve/storage.cfg
|
||||
regexp: '(dir:\s*{{ proxmox_snippets_storage }}[\s\S]*?content\s+)(.*)(?<!snippets)'
|
||||
replace: '\1\2,snippets'
|
||||
vars:
|
||||
regexp: '^(\s*content\s*=.*?)(?<!snippets)$'
|
||||
replace: '\1,snippets'
|
||||
multiline: true
|
||||
vars:
|
||||
proxmox_snippets_storage: local
|
||||
|
||||
- name: "[PREFLIGHT] Ensure snippets storage directory exists"
|
||||
|
||||
Reference in New Issue
Block a user