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

Fix exception in pkgin module when all packages are already installed (#3583) (#3596)

* Fix exception in pkgin module when all packages are already installed.

* Update plugins/modules/packaging/os/pkgin.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add changelog fragment for #3583

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 86a22b5ed2)

Co-authored-by: Nate Coraor <nate@bx.psu.edu>
This commit is contained in:
patchback[bot] 2021-10-22 08:07:10 +02:00 committed by GitHub
parent ad4efaeb31
commit 71de1ee1d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- pkgin - Fix exception encountered when all packages are already installed (https://github.com/ansible-collections/community.general/pull/3583).

View file

@ -281,9 +281,9 @@ def install_packages(module, packages):
install_c += 1
if install_c > 0:
module.exit_json(changed=True, msg=format_action_message(module, "installed", install_c))
module.exit_json(changed=True, msg=format_action_message(module, "installed", install_c), stdout=out, stderr=err)
module.exit_json(changed=False, msg="package(s) already present", stdout=out, stderr=err)
module.exit_json(changed=False, msg="package(s) already present")
def update_package_db(module):