From 8189f46a039cfd5aa8a38e27f2c0d7f790b726af Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Thu, 21 Dec 2023 09:36:47 -0500 Subject: [PATCH] only run the file.absent state if there are files to delete --- salt/curator/disabled.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salt/curator/disabled.sls b/salt/curator/disabled.sls index df0274766..07346aa02 100644 --- a/salt/curator/disabled.sls +++ b/salt/curator/disabled.sls @@ -27,6 +27,8 @@ delete_curator_configuration: - recurse: True {% set files = salt.file.find(path='/usr/sbin', name='so-curator*') %} +{% if files|length > 0 %} delete_curator_scripts: file.absent: - names: {{files|yaml}} +{% endif %} \ No newline at end of file