mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-29 06:43:08 +00:00
[PR #8263/17e11d7d backport][stable-8] apt_rpm: fix package install check (#8270)
apt_rpm: fix package install check (#8263)
Fix package install check.
(cherry picked from commit 17e11d7d7e)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
2
changelogs/fragments/8263-apt_rpm-install-check.yml
Normal file
2
changelogs/fragments/8263-apt_rpm-install-check.yml
Normal 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)."
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user