Hi guys I am looking to add an existing hard drive to a vm in vsphere
however it seems to be expecting the size to be populated.
[code]
---
- name: adding drive
vsphere_guest:
vcenter_hostname: "{{ thehypper }}"
username: "{{ myuser }}"
password: "{{ mypass }}"
guest: "{{ guest_name }}"
state: reconfigured
vm_disk:
disk2:
datastore: "{{ dataStore }}"
# type: thick
# size_gb: "10"
folder: NexusData/
disk_file: nexusdata.vmdk
validate_certs: False
[/code]
playbook snippet output:
[code]
\"/var/fold
ers/v7/y40ls2mx5sjbpqfm4ctym4l1czrh2g/T/ansible_9VKigd/ansible_module_vsphere_guest.py\",
line 792, in update_disks\n hd.CapacityInKB =
int(vm_disk[cnf_disk]['size_gb'])
* 1024 * 1024\nKeyError: 'size_gb'\n", "module_stdout": "", "msg": "MODULE
FAILURE", "parsed": false}
[/code]
--
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/65a97fca-ecab-42eb-857c-83c56c785949%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.