1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #5182 from mscherer/fix_5177

Fix apt module to be able to install package by giving just a provides a...
This commit is contained in:
jctanner 2013-12-05 09:01:59 -08:00
commit 9dec25854e

View file

@ -169,6 +169,8 @@ def package_status(m, pkgname, version, cache, state):
ll_pkg = cache._cache[pkgname] # the low-level package object
except KeyError:
if state == 'install':
if cache.get_providing_packages(pkgname):
return False, True, False
m.fail_json(msg="No package matching '%s' is available" % pkgname)
else:
return False, False, False