VMware Template playbook options

Hi

I am setting up a new VMware virtual machine from a template using a Ansible playbook.

I want to be able to change the datastore and the network (vm_disk and vm_nic) of the VM during the setup of the VM. But when I add this information into the playbook (see below), nothing happens.
The new VM is created, but the datastore and network have not been adjust to what I requested in the playbook. They have remained the same as what the template image is.

Am I doing something incorrect in the playbook? Or is this not possible with Ansible?

Playbook (highlighted in bold is what is not being adjusted)

hi Mark,

I too also facing the same problem. I wanted to do the same.
By any chance you have figured it out?
Thanks. :slight_smile:

This would be a great feature. We use templates that we get from customers with suites of software already installed so I can’t build it from iso every time.

Hi Mark,

have you got any news on this one ?
I am currently trying to do the same thing and it does not work.
I’ve tried to clone the vm/template and reconfigure it while being powered off but that didn’t help either.

Cheers
Radu

Try this one: https://github.com/whereismyjetpack/ansible_vcenter_module
The Network Interface part works for me.