Merge pull request #12067 from Security-Onion-Solutions/jertel/fixcurator

only run the file.absent state if there are files to delete
This commit is contained in:
Jason Ertel
2023-12-21 09:41:46 -05:00
committed by GitHub

View File

@@ -27,6 +27,8 @@ delete_curator_configuration:
- recurse: True - recurse: True
{% set files = salt.file.find(path='/usr/sbin', name='so-curator*') %} {% set files = salt.file.find(path='/usr/sbin', name='so-curator*') %}
{% if files|length > 0 %}
delete_curator_scripts: delete_curator_scripts:
file.absent: file.absent:
- names: {{files|yaml}} - names: {{files|yaml}}
{% endif %}