remove minion pillar files when a vm is destroyed

This commit is contained in:
Josh Patterson
2025-03-11 11:12:45 -04:00
parent c784a6e440
commit ae993c47c1
3 changed files with 43 additions and 11 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
@@ -8,4 +8,11 @@ remove_key:
- args:
- match: {{ data['name'] }}
{{ data['name'] }}_pillar_clean:
runner.state.orchestrate:
- args:
- mods: orch.vm_pillar_clean
- pillar:
vm_name: {{ data['name'] }}
{% do salt.log.info('deleteKey reactor: deleted minion key: %s' % data['name']) %}