- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ansible Get VMs per datastore
Hello,
Is it possible to return with an ansible module from the vmware.vmware_rest collection a list of VMs per datastore.
I'm trying to obtain the same result as the following powershell command: "Get-VM -Datastore datastore-name", but with Ansible.
How can I achieve that?
In the final, I want a dict with the vm name and the datastore:
vm1;datastoreA
vm2;datastoreA
vm3;datastoreB
vm4;datastoreC
...
Tanks for your help.