community.vmware.vmware_guest_find – Find the folder path(s) for a virtual machine by name or UUID¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_guest_find
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: Find Guest's Folder using name
community.vmware.vmware_guest_find:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: testvm
delegate_to: localhost
register: vm_folder
- name: Find Guest's Folder using UUID
community.vmware.vmware_guest_find:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
uuid: 38c4c89c-b3d7-4ae6-ae4e-43c5118eae49
delegate_to: localhost
register: vm_folder
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
folders
list
/ elements=string
|
on success |
List of folders for user specified virtual machine
Sample:
['/DC0/vm']
|
Authors¶
Abhijeet Kasurde (@Akasurde) <akasurde@redhat.com>