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:
parent
45d3661ccf
commit
86a22b5ed2
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/3583-fix-pkgin-exception.yml
Normal file
2
changelogs/fragments/3583-fix-pkgin-exception.yml
Normal 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).
|
|
@ -281,9 +281,9 @@ def install_packages(module, packages):
|
||||||
install_c += 1
|
install_c += 1
|
||||||
|
|
||||||
if install_c > 0:
|
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):
|
def update_package_db(module):
|
||||||
|
|
Loading…
Reference in a new issue