mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
apk: Fix failure when both install and upgrade in same command (#26666)
* apk: Fix failure when both install and upgrade in same command If name list contains an installed package that needs upgrade plus a new package, apk command would fail due to missing space character. * Simplify fix by concatenating lists
This commit is contained in:
parent
31b6ac896d
commit
c24398cfd9
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ def install_packages(module, names, state):
|
|||
upgrade = True
|
||||
if not to_install and not upgrade:
|
||||
module.exit_json(changed=False, msg="package(s) already installed")
|
||||
packages = " ".join(to_install) + " ".join(to_upgrade)
|
||||
packages = " ".join(to_install + to_upgrade)
|
||||
if upgrade:
|
||||
if module.check_mode:
|
||||
cmd = "%s add --upgrade --simulate %s" % (APK_PATH, packages)
|
||||
|
|
Loading…
Add table
Reference in a new issue