# ESXi upgrade by using Ansible

**URL:** <https://forum.ansible.com/t/esxi-upgrade-by-using-ansible/28061>\
**Category:** Ansible Project\
**Created:** [July 16, 2018, 7:24pm UTC](https://forum.ansible.com/t/esxi-upgrade-by-using-ansible/28061 "2018-07-16T19:24:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramesh\_AR](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@Ramesh\_AR](https://forum.ansible.com/u/Ramesh_AR)\
**Post date:** [July 16, 2018, 7:24pm UTC](https://forum.ansible.com/t/esxi-upgrade-by-using-ansible/28061/1 "2018-07-16T19:24:38Z")

</div>

Hi,

I want to do esxi upgrade by using ansible playbook. Can you guys help me on this.

Or can I pass powercli script in ansible . Does it help ?

Requirements steps for upgrade.

Disable host alarms  
VMs migration from one host to another  
Put host into maintenance  
Remove from vcenter  
Do esxi upgrade and upon reboot add the esxi to vcenter and enable alarm
