With vsphere_copy, I can upload files to a vsphere datastore, but I want to download a .vmdk file from a datastore to my local server. Is there an ansible module that will let me download from a datastore?
spongebob33167 <mike.s.rose@gmail.com> writes:
With vsphere_copy, I can upload files to a vsphere datastore, but I want to
download a .vmdk file from a datastore to my local server. Is there an
ansible module that will let me download from a datastore?
Hi Spongebob33167!
You can already browse the /folder end-point with a browser and so use
the get_url module:
e.g: https://192.168.1.40/folder on my ESXi returns a listing of the
datacenter. And I can navigate to finally download a file.
The API documentation:
https://pubs.vmware.com/vsphere-6-5/index.jsp?topic=%2Fcom.vmware.vcli.examples.doc%2FGUID-7675E084-5A80-4517-83B7-6BBC69F8D145.html
Regards,
Thank you! get_url works. The tricky part was figuring out the url to the file I wanted.