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

apt_rpm: fix package install check (#8263)

Fix package install check.
This commit is contained in:
Felix Fontein 2024-04-22 06:42:04 +02:00 committed by GitHub
parent 211688ef1b
commit 17e11d7d7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "apt_rpm - when checking whether packages were installed after running ``apt-get -y install <packages>``, only the last package name was checked (https://github.com/ansible-collections/community.general/pull/8263)."

View file

@ -281,7 +281,7 @@ def install_packages(module, pkgspec, allow_upgrade=False):
rc, out, err = module.run_command("%s -y install %s" % (APT_PATH, packages), environ_update={"LANG": "C"})
installed = True
for packages in pkgspec:
for package in pkgspec:
if not query_package_provides(module, package, allow_upgrade=False):
installed = False