From ccd8405b358add6d35b09fc8990083eed5b25e88 Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Sat, 29 Apr 2023 06:12:44 +0000 Subject: [PATCH] fix(vmware_vsan_health_info): Return dict instead of JSON string (#1706) 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 --- changelogs/fragments/1706-vmware_vsan_health_info.yml | 2 ++ plugins/modules/vmware_vsan_health_info.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/1706-vmware_vsan_health_info.yml diff --git a/changelogs/fragments/1706-vmware_vsan_health_info.yml b/changelogs/fragments/1706-vmware_vsan_health_info.yml new file mode 100644 index 000000000..a3db51a2f --- /dev/null +++ b/changelogs/fragments/1706-vmware_vsan_health_info.yml @@ -0,0 +1,2 @@ +bugfixes: + - vmware_vsan_health_info - Fix return value (https://github.com/ansible-collections/community.vmware/pull/1706). diff --git a/plugins/modules/vmware_vsan_health_info.py b/plugins/modules/vmware_vsan_health_info.py index d369efb57..89db649de 100644 --- a/plugins/modules/vmware_vsan_health_info.py +++ b/plugins/modules/vmware_vsan_health_info.py @@ -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():