diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index 7f1f7b6588..1959477f2d 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -269,7 +269,7 @@ def package_status(m, pkgname, version, cache, state): installed, upgradable, has_files = package_status(m, package.name, version, cache, state='install') if installed: is_installed = True - return is_installed, True, False + return is_installed, upgradable, False m.fail_json(msg="No package matching '%s' is available" % pkgname) except AttributeError: # python-apt version too old to detect virtual packages