add pack only holding package if installed. remove redundant hold on salt-master package

This commit is contained in:
Josh Patterson
2025-07-23 10:16:12 -04:00
parent af49a8e4ef
commit 56748ea6e7
2 changed files with 8 additions and 10 deletions

View File

@@ -23,11 +23,6 @@ sync_runners:
- name: saltutil.sync_runners
{% endif %}
hold_salt_master_package:
module.run:
- pkg.hold:
- name: salt-master
# prior to 2.4.30 this engine ran on the manager with salt-minion
# this has changed to running with the salt-master in 2.4.30
remove_engines_config:

View File

@@ -58,12 +58,15 @@ start_minion_post_upgrade:
{% endif %}
{% if INSTALLEDSALTVERSION|string == SALTVERSION|string %}
# only hold the package if it is already installed
hold_salt_packages:
pkg.held:
- pkgs:
{% for package in SALTPACKAGES %}
- {{ package }}: {{SALTVERSION}}-0.*
# only hold the package if it is already installed
{% if salt['pkg.version'](package) %}
hold_{{ package }}_package:
pkg.held:
- name: {{ package }}
- version: {{SALTVERSION}}-0.*
{% endif %}
{% endfor %}
remove_error_log_level_logfile: