From c66cd3b2f3c25880b8c440c14fa50c20ff7dec64 Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Mon, 10 Mar 2025 11:23:26 -0400 Subject: [PATCH] ensure image is readded if removed --- salt/libvirt/images/init.sls | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/libvirt/images/init.sls b/salt/libvirt/images/init.sls index 91350de42..94cf4959d 100644 --- a/salt/libvirt/images/init.sls +++ b/salt/libvirt/images/init.sls @@ -16,6 +16,12 @@ include: - libvirt.packages +# Remove hash file if image isn't present. This will allow for the image to redownload and initialize. +remove_sha256_sool9: + file.absent: + - name: /nsm/libvirt/images/sool9/sool9.sha256 + - unless: test -f /nsm/libvirt/images/sool9/sool9.qcow2 + # Manage SHA256 hash file manage_sha256_sool9: file.managed: