Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder parameter should not be needed when unregistering a VM from the inventory. #2182

Open
christian-naenny opened this issue Sep 20, 2024 · 1 comment
Assignees

Comments

@christian-naenny
Copy link

SUMMARY

Folder parameter should not be needed when unregistering a VM from the inventory.

ISSUE TYPE
  • Improvement Idea
COMPONENT NAME

community.vmware.vmware_guest_register_operation

ADDITIONAL INFORMATION

When unregistering a VM from the inventory, the folder parameter has to be provided. Why? Is the VM name not unique in one particular datacenter? If yes, then the vCenter API can determine the folder on its own! The provided playbook snippet below should be enough to unregister a VM.

- name: "unregister-dr-include | unregister the VM: {{ item.snbhostname }}"
  community.vmware.vmware_guest_register_operation:
    hostname: "{{ vcenter }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    datacenter: "{{ datacenter }}"
    cluster: "{{ cluster }}"
    name: "{{ vmname }}"
    state: "absent"
@sky-joker
Copy link
Collaborator

Thank you @christian-naenny for improving the idea!
I see. As you mentioned, I also think it’s a good idea to allow the folder parameter to be omitted.
I will work on improving the module.

@sky-joker sky-joker self-assigned this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants