Skip to content

Commit

Permalink
fix(vmware_vsan_health_info): Return dict instead of JSON string (#1706)
Browse files Browse the repository at this point in the history
fix(vmware_vsan_health_info): Return dict instead of JSON string

SUMMARY

Fixes #1648
While the module description says that the return type should be a dict, it actually returns a JSON string

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

vmware_vsan_health_info
ADDITIONAL INFORMATION

Reviewed-by: Mario Lenz <m@riolenz.de>
  • Loading branch information
p-fruck authored Apr 29, 2023
1 parent ab1d7db commit ccd8405
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/1706-vmware_vsan_health_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vmware_vsan_health_info - Fix return value (https://github.com/ansible-collections/community.vmware/pull/1706).
2 changes: 1 addition & 1 deletion plugins/modules/vmware_vsan_health_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def gather_info(self):

health = json.dumps(cluster_health, cls=VmomiSupport.VmomiJSONEncoder, sort_keys=True, strip_dynamic=True)

self.module.exit_json(changed=False, vsan_health_info=health)
self.module.exit_json(changed=False, vsan_health_info=json.loads(health))


def main():
Expand Down

0 comments on commit ccd8405

Please sign in to comment.