Per issue #11415, this was added into yumpkg. If doing any yum exclusion enforcement, states will fail when trying to install anything that was excluded. It's preferable to add disableexcludes to the states.pkg vs. having no exclusions and then doing holds on most versions of packages on the system or doing something similar to this:
httpd:
pkg.installed:
- hold: True
- version: {{ httpd_version }}
- cmd.run:
- name: yum install --disableexcludes=all httpd
IMO, disableexcludes should not be set unless specifically included.
@seanjnkns, thanks for the report.
I fail to see how #29707 addresses any part of this issue/feature request. What I'm recommending is something similar to this, assuming say httpd* was excluded in your /etc/yum.conf. I realize doesn't work for all distros:
httpd:
pkg.installed:
And this should just as easily be extended to pkgs, not just pkg, if there's a grouping and you want to ensure that exclusions are disabled for salt runs, but otherwise enforced. This then makes salt's salt.states.pkg.uptodate usable while not blindly updating everything, imo.
I made a mistake when linking this PR.
Sorry about that.
Since #11415 added this functionality to execution module yumpkg, there is now unexpected feature disparity between the pkg state and the yumpkg execution module. The labels of this issue should include state module, surely?
+1
When this feature will be added to states.pkg?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
I think this is still needed.
Excludes are often used for Kubernetes deployments for example, to avoid unattended upgrades.
This feature is still needed like in Kubernetes installations as aforementioned.
Most helpful comment
I think this is still needed.
Excludes are often used for Kubernetes deployments for example, to avoid unattended upgrades.