hi, I havent used Ansible for ESXi or VM hardening. But lot of customers use Orchestrator and PowerCLI for this. You can find plenty of articles on web. Here are couple of them.
Automate the Hardening of Your Virtual Machine VMX Configurations - VMware vSphere Blog
http://mycloudrevolution.com/2016/01/11/vm-hardening-mit-vrealize-orchestrator-oder-powercli/