Hi,

I have an issue with the 'vmware_guest' module.

Ik have the following 2 tasks:

- name: "Create VM"
  vsphere_guest:
    vcenter_hostname: vcenter
    username: vcenter_user
    password: vcenter_password
    validate_certs: no
    guest: newvm001
    from_template: yes
    template_src: template-centos-7-1
    cluster: cluster
    power_on_after_clone: no
    esxi:
      datacenter: datacenter
      hostname: esxi1

- name: "Reconfigure VM"
  vsphere_guest:
    vcenter_hostname: vcenter
    username: vcenter_user
    password: vcenter_password
    validate_certs: no
    guest: newvm001
    state: reconfigured
    vm_disk:
      disk1:
        size_gb: 20
        type: 'thin'
        datastore: ds_system
      disk2:
        size_gb: 30
        type: 'thin'
        datastore: ds_data
    vm_nic:
      nic1:
        type: vmxnet3
        network: 192.168.1.x
        network_type: standard
      nic2:
        type: vmxnet3
        network: 192.168.2.x
        network_type: standard
    esxi:
      datacenter: datacenter
      hostname: esxi1
    vm_hardware:
      memory_mb: 2048
      num_cpus: 2

Creating the guest is working correctly and the template is cloned into the 
vm. This is an CentOS 7 and has 1 nic and 1 disk (disk1) and Vmware is on 
5.5
When the 2nd task is running, it gives an error:

{"changed": false, "failed": true, "msg": "Error in vm_disk definition. Too 
many disks defined in comparison to the VM's disk profile."}

When I execute the 2nd task again, it will run successfully, but the disk 
in "thick" and not "thin" provisioned.
What am I doing wrong? Or do I encounter an bug?

I'm running Ansible 2.0.1.0
Thanks in advance.

Kind regards,
Werner

-- 
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/5e5314f7-2b94-4869-ad91-8396f046a20c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to