ESXi upgrade by using Ansible

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