From 6ef534f8d8522e30f4873ea264e61a8d197a0d76 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 9 Dec 2025 20:41:44 +0100 Subject: [PATCH] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Preflight:=20S?= =?UTF-8?q?nippets=20configuration=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit refactors the preflight task to intelligently check if the 'snippets' configuration is already present in the `/etc/pve/storage.cfg` file. It avoids redundant replacement operations and improves the preflight process by determining if the configuration is already set, preventing unnecessary modifications. --- tasks/testing.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tasks/testing.yml b/tasks/testing.yml index 96692d9..95cdc91 100644 --- a/tasks/testing.yml +++ b/tasks/testing.yml @@ -10,23 +10,24 @@ 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+)(.*)(?