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>pull/3604/head
parent
45d3661ccf
commit
86a22b5ed2
|
@ -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
|
||||
|
||||
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):
|
||||
|
|
Loading…
Reference in New Issue