prevent state from failing if versionlock plugin not installed

This commit is contained in:
m0duspwnens
2024-10-18 14:41:23 -04:00
parent 39230159ae
commit 4d093735ec

View File

@@ -3,8 +3,8 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% if grains.os_family == 'Debian' or (grains.os_family == 'RedHat' and salt['pkg.version']('python3-dnf-plugin-versionlock') != "") %}
{% from 'versionlock/map.jinja' import VERSIONLOCKMERGED %}
{% for pkg in VERSIONLOCKMERGED.hold %}
{{pkg}}_held:
pkg.held:
@@ -16,3 +16,4 @@
pkg.unheld:
- name: {{pkg}}
{% endfor %}
{% endif %}