Files
securityonion/salt/docker_clean/init.sls
William Wernert 33696398eb Add new so-docker-prune script
* Script will pull list of so- images and prune any older than most recent + last version
2021-02-26 18:06:07 -05:00

15 lines
265 B
Plaintext

{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
prune_images:
cmd.run:
- name: so-docker-prune
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}