diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index 77f1e431b2f..ad1807f9c20 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -208,7 +208,8 @@ def package_status(m, pkgname, version, cache, state): m.fail_json(msg="No package matching '%s' is available" % pkgname) except AttributeError: # python-apt version too old to detect virtual packages - m.fail_json(msg="No package matching '%s' is available (python-apt version too old to detect virtual packages)" % pkgname) + # mark as upgradable and let apt-get install deal with it + return False, True, False else: return False, False, False try: