1
0
Fork 0
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:
ppanczyk 2017-08-30 20:46:52 +02:00 committed by ansibot
parent 5c0b94217e
commit c9b74a3af3

View file

@ -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