Hello Richard, although this thread is somewhat old I hope you are still reading here and have some advise for me, because I'm going to accomplish the same task.
I'll have some virtual machines in my vSphere environment which I like to: 1. Take a snapshot and if successful 2. Run task that installs updates on guest os 3. Reboot guest if necessary My problem is, that my VMs are not in the same folder. They are spread across the cluster in many different folders. But because they are not too many I would be able to specify them manually by name or uuid. Looking around for someone who has already solved this I found your post and was hoping you could give me some advise here. Do you have for any chance a working solution you could share? Best regards, Joerg Am Donnerstag, 18. Mai 2017 21:50:48 UTC+2 schrieb Richard Garrow: > > Hi all here is the solution to this issue I really hope this helps the > next poor person who has to bang there head for weeks trying to figure this > one out. > > --- > - hosts: all > tasks: > - name: Create Snapshot > vmware_guest_snapshot: > datacenter: Development > hostname: virtual server name > folder: /DVT-UX > username: John doe > password: xxxxxx > name: "{{ ansible_hostname }}" > uuid: "{{ ansible_product_uuid | lower }}" > state: present > snapshot_name: test1 > description: patch_snapshot > validate_certs: false > delegate_to: localhost > This does work I have confirmed it. > I really do want to thank Kai for all his help on this I really owe you > one sir.. > I will update this later with the final playbook we are trying to patch > our servers using ansible. if physical patch if virtual take snapshot then > patch, reboot if needed. > > Thanks.. > > On Thursday, May 18, 2017 at 11:12:28 AM UTC-4, Kai Stian Olstad wrote: >> >> On 18. mai 2017 15:11, ameri...@optonline.net wrote: >> > Hi Kai, >> > >> > Thank you for taking the time to review and reply. I thought the same >> thing >> > yesterday and ran through every option I could think of. the funny part >> > about the module is it states in the documentation that UUID is not >> > required but if I run it with out the UUID I get a different result. >> >> Have you read this one? >> >> "vmware_guest_snapshot don't find vm if not folder is specified" >> https://github.com/ansible/ansible/issues/22644 >> >> >> -- >> Kai Stian Olstad >> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/65209032-608f-4daa-866c-7583a3baedc3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.