vsphere_guest : setting Guest IP address

Hello,
I’m looking for the best way to use Ansible for provisionning ESXi VM.

It’s easy to spin new VM via vsphere_guest

It’s easy to use playbook on ssh connectable VM

…I’m just looking the best (easy ?) way between these 2 steps.
How can I set static ip address in VM spined by vsphere_guest ?

Ben

Are you cloning a existing VM or are you creating a new one and want to know how to install the OS after creation?

Both option are open.

Have a look here and see if it is of any help. I ended up creating scripts to go from phase to phase. Have a look in vm_provisioning.

https://github.com/mrlesmithjr/Ansible