fix: update snippet enabling logic for Proxmox storage configuration
This commit is contained in:
@@ -160,13 +160,10 @@
|
||||
- name: "[PREFLIGHT] Ensure Proxmox storage supports snippets"
|
||||
block:
|
||||
- name: "[PREFLIGHT] Ensure 'snippets' is enabled for {{ proxmox_snippets_storage }}"
|
||||
ansible.builtin.lineinfile:
|
||||
ansible.builtin.replace:
|
||||
path: /etc/pve/storage.cfg
|
||||
regexp: '^(\s*content\s+.*)(?<!snippets)$'
|
||||
line: '\1,snippets'
|
||||
backrefs: yes
|
||||
# Limit the match to lines following the correct storage ID
|
||||
insertafter: "^dir: {{ proxmox_snippets_storage }}$"
|
||||
regexp: '(dir:\s*{{ proxmox_snippets_storage }}[\s\S]*?content\s+)(.*)(?<!snippets)'
|
||||
replace: '\1\2,snippets'
|
||||
|
||||
- name: "[PREFLIGHT] Ensure snippets storage directory exists"
|
||||
ansible.builtin.file:
|
||||
|
||||
Reference in New Issue
Block a user