diff --git a/tasks/preflight-checks.yml b/tasks/preflight-checks.yml index acb7cb2..e31d835 100644 --- a/tasks/preflight-checks.yml +++ b/tasks/preflight-checks.yml @@ -30,10 +30,10 @@ msg: "Proxmox Version: {{ qm_version.stdout }}" - name: "[PREFLIGHT] Verify storage pool exists" - ansible.builtin.command: "pvesm status {{ storage }}" + ansible.builtin.shell: "pvesm status | awk '{print $1}' | grep -w {{ storage }}" changed_when: false - failed_when: false register: storage_check + failed_when: storage_check.rc != 0 - name: "[PREFLIGHT] Fail if storage not found" ansible.builtin.fail: