Waiting for OS customization to complete

A question,

We have templates that have been saved with sysprep.
As I can with Ansible, after deploying the templates, wait for OS customization of sysprep to be completed.

I have seen the following article for powercli, but for Ansible ??

https://blogs.vmware.com/PowerCLI/2012/08/waiting-for-os-customization-to-complete.html

Do you know if there is any way to listen to the vmware events in the esx, to wait for xxx event?

The events are displayed on the vSphere Client

One thing you can do is make the opening of the connection (SSH/WinRM) the last step of the customization. You then have a task that waits for the connection to open which would mean the setup is complete.

Thanks

Jordan