Skip to content

Commit

Permalink
vm_list_group_by_clusters: Fix return value
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed Jun 3, 2024
1 parent 722e05f commit 223f550
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/36-vm_list_group_by_clusters_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vm_list_group_by_clusters_info - Fix return value (https://github.com/ansible-collections/vmware.vmware/pull/36).
7 changes: 6 additions & 1 deletion plugins/modules/vm_list_group_by_clusters_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ def main():

vmware_vm_list_group_by_clusters_mgr = VmwareVMList(module)
vm_list_group_by_clusters_info = vmware_vm_list_group_by_clusters_mgr.get_vm_list_group_by_clusters()
module.exit_json(changed=False, vm_list_group_by_clusters_info=vm_list_group_by_clusters_info)
if module._name == 'vm_list_group_by_clusters_info':
module.exit_json(changed=False, vm_list_group_by_clusters_info=vm_list_group_by_clusters_info)
elif module._name == 'vm_list_group_by_clusters':
module.exit_json(changed=False, vm_list_group_by_clusters=vm_list_group_by_clusters_info)
else:
module.fail_json(msg="There seems to be bug in this module. Please open an issue. This should never happen.")


if __name__ == '__main__':
Expand Down

0 comments on commit 223f550

Please sign in to comment.