mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixed 'only_upgrade' so that the status was not always 'changed' (#25213)
This commit is contained in:
parent
5c0b94217e
commit
c9b74a3af3
1 changed files with 1 additions and 1 deletions
|
@ -491,7 +491,7 @@ def install(m, pkgspec, cache, upgrade=False, default_release=None,
|
|||
|
||||
name, version = package_split(package)
|
||||
installed, upgradable, has_files = package_status(m, name, version, cache, state='install')
|
||||
if not installed or (upgrade and upgradable):
|
||||
if (not installed and not only_upgrade) or (upgrade and upgradable):
|
||||
pkg_list.append("'%s'" % package)
|
||||
if installed and upgradable and version:
|
||||
# This happens when the package is installed, a newer version is
|
||||
|
|
Loading…
Reference in a new issue