mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fixed 'only_upgrade' so that the status was not always 'changed' (#25213)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user