Skip to content

Commit

Permalink
apt_rpm: fix package install check (#8263)
Browse files Browse the repository at this point in the history
Fix package install check.

(cherry picked from commit 17e11d7)
  • Loading branch information
felixfontein authored and patchback[bot] committed Apr 22, 2024
1 parent 0486389 commit fbf3e69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/8263-apt_rpm-install-check.yml
Original file line number Diff line number Diff line change
@@ -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)."
2 changes: 1 addition & 1 deletion plugins/modules/apt_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fbf3e69

Please sign in to comment.