I've been reading the vsphere_guest docs and it seems to fit my use case in a lot of ways, but it's not clear to me how I would take a VM snapshot?
How would one go about safely upgrading VMs in VCenter in an Ansible playbook?
This is a little late at this point, but wanted to point it out if anyone else was looking for this.
There has been a module introduced that will let you take a snapshot.
http://docs.ansible.com/ansible/vmware_guest_snapshot_module.html
I'm playing around with it currently.
There currently is no module (core or extras) to create a VMWare snapshot. There was a request for this feature under extras but it looks like the person who submitted the feature request never followed through with submitting it to the extras modules for Ansible.
This means you would have to take a snapshot of your VM in vSphere prior to using Ansible to upgrade your VMs. There are likely other ways to automate the snapshot process without Ansible however I am not familiar with that. You can view all the VMWare extras modules in github: https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/vmware