mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
If force=true, ignore python-apt's advice
This lets you downgrade packages, for instance.
This commit is contained in:
parent
07d4ddfeff
commit
2363074dd8
1 changed files with 1 additions and 1 deletions
|
@ -333,7 +333,7 @@ def install_deb(m, debs, cache, force, install_recommends, dpkg_options):
|
||||||
if pkg.compare_to_version_in_cache() == pkg.VERSION_SAME:
|
if pkg.compare_to_version_in_cache() == pkg.VERSION_SAME:
|
||||||
continue
|
continue
|
||||||
# Check if package is installable
|
# Check if package is installable
|
||||||
if not pkg.check():
|
if not pkg.check() and not force:
|
||||||
m.fail_json(msg=pkg._failure_string)
|
m.fail_json(msg=pkg._failure_string)
|
||||||
|
|
||||||
# add any missing deps to the list of deps we need
|
# add any missing deps to the list of deps we need
|
||||||
|
|
Loading…
Reference in a new issue