Hmm, looks like vsphere_guest.py is only checking folder info from
vm_extra_config when cloning a template:
try:
if not vmTarget:
cloneArgs = dict(resourcepool=rpmor, power_on=power_on_after_clone)
if snapshot_to_clone is not None:
#check if snapshot_to_clone is specified, Create a Linked Clone instead of
a full clone.
cloneArgs["linked"] = True
cloneArgs["snapshot"] = snapshot_to_clone
if vm_extra_config.get("folder") is not None:
# if a folder is specified, clone the VM into it
cloneArgs["folder"] = vm_extra_config.get("folder")
vmTemplate.clone(guest, **cloneArgs)
Need to look into pyvmomi to check if we can add some fields to specify my
system.id in .vmx.
Op dinsdag 2 februari 2016 19:49:42 UTC+1 schreef John Grinwis:
>
> Hi,
>
> we're doing some test with deploying a Juniper vSRX on our VMware
> environment using Ansible 2.1.0
> This vSRX can configure itself if you add machine.id with some parameters
> to the .vmx file.
> But if we try to use the following vm_extra_config: in our playbook:
>
> vm_extra_config:
> folder: vSRX
> machine.id: hostname=initial-vsrx.test.nl
> annotation: testtesttest
> notes: test
>
> It's cloning the VM template, placing the VM in the correct folder but no
> changes to the .vmx file.
> So machine.id is not added to the .vmx file but also the notes are not
> being updated.
>
> Is this expected behaviour?
> According to the docs: vm_extra_config: A key, value pair of any extra
> values you want set or changed in the vmx file of the VM
>
> Regards,
> John
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/41761a61-12ad-45bf-9e89-a9e1cd773aed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.