[BUG] pkg.installed state with pkgs argument but no version gives WARNING #64563
Labels
Bug
broken, incorrect, or confusing behavior
Regression
The issue is a bug that breaks functionality known to work in previous releases.
RHEL
Related to running salt on or targeting Red Had Enterprise Linux
Milestone
Description
For some of my
pkg.installed
states I get this warningI am not specifying a
'version'
argument though.My state looks like this:
See https://devops.stackexchange.com/questions/18023/in-salt-what-causes-the-warning-version-argument-will-be-ignored-for-multiple
The code in lines 1450-1451 in yumpkg.py (https://github.com/saltstack/salt/blame/0892d076846525e694f8aedb6217884ca75845f3/salt/modules/yumpkg.py#L1450-L1451) converts the version argument to a
str
, but it converts even if the version argument isNone
which then converts the version argument to the literal string'None'
. This code needs to check that the value is not None before converting to a string.Setup
Steps to Reproduce the behavior
Expected behavior
No warning is display when using
pkgs
and not specifying aversion
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: