Hello all, I have been using Ansible to manage snapshots for single specified vm’s. Is there a way to have Ansible remove snapshots for all vm’s in Vmware datacenter? If this is posssible, would you mind providing a play book example?
Below is an example where I remove a snapshot from a single vm:
I’ve tried first running vmware_vm_info to get all vm’s and debug from that shows all vms allong with other info on the vm’s. I would like to loop the “guest_name” into the above snapshot removal using with_item, but not having any luck so far. I may be going at this the wrong way. Any help is appreciated,
Seems to be working on all datacenters (which is what I wanted) even though I only had one defined. Do you work @ Redhat? I was looking you up on LinkedIn.
vmware_vm_info finds all VMS irrespective of the datacenter (because it was designed that way) but snapshot takes datacenter and folder into consideration so I think you are good to go.