how to deploy vmware from template with ansible: changing the local user, expanding the disk and identifying when sysprep is completed.

After several weeks searching for information and getting it, I give you the playbook.
Feel free to answer to improve it or show me the faults

After several weeks searching for information and getting it, I give you the playbook.
Feel free to answer to improve it or show me the faults

requires GOVC https://github.com/vmware/govmomi/releases

Thanks for the playbook. I noticed a small problem with the ‘Check for customization succeeded’ task: When a VM with the same name has been created (and removed) earlier and the corresponding events are still in the guestcust.log file of VMware, this playbook will detect a CustomizationSucceeded event for the older VM with the same name and will incorrectly conclude that the customization for the newly created VM has succeeded.

The “govc events” command regrettably has no “-since” option where you could tell govc that you are only interested in events since a certain date and time.