mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
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:
@@ -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 %}
|
||||||
Reference in New Issue
Block a user