# Waiting for OS customization to complete

**URL:** <https://forum.ansible.com/t/waiting-for-os-customization-to-complete/27480>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [May 8, 2018, 9:42am UTC](https://forum.ansible.com/t/waiting-for-os-customization-to-complete/27480 "2018-05-08T09:42:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrvilda](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jrvilda](https://forum.ansible.com/u/jrvilda)\
**Post date:** [May 8, 2018, 9:42am UTC](https://forum.ansible.com/t/waiting-for-os-customization-to-complete/27480/1 "2018-05-08T09:42:18Z")

</div>

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](https://blogs.vmware.com/PowerCLI/2012/08/waiting-for-os-customization-to-complete.html)

---

<div class="post-metadata">

**Author:** ![jrvilda](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jrvilda](https://forum.ansible.com/u/jrvilda)\
**Post date:** [May 16, 2018, 1:19pm UTC](https://forum.ansible.com/t/waiting-for-os-customization-to-complete/27480/2 "2018-05-16T13:19:01Z")

</div>

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

[![](https://lh3.googleusercontent.com/-Pm-XKZBd6U8/WvwvdFxfGXI/AAAAAAABUiM/oV-JuaW-vIwcSXSHJAfSx3gawPBMa16LgCLcBGAs/s320/2018-05-16_151858.png)](https://lh3.googleusercontent.com/-Pm-XKZBd6U8/WvwvdFxfGXI/AAAAAAABUiM/oV-JuaW-vIwcSXSHJAfSx3gawPBMa16LgCLcBGAs/s1600/2018-05-16_151858.png)

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [May 16, 2018, 8:58pm UTC](https://forum.ansible.com/t/waiting-for-os-customization-to-complete/27480/3 "2018-05-16T20:58:09Z")

</div>

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
