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)

* 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>
This commit is contained in:
Nate Coraor 2021-10-22 01:47:27 -04:00 committed by GitHub
parent 45d3661ccf
commit 86a22b5ed2
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):