- name: add disk space
vmware_guest_disk:
hostname: "{{s}}"
username: "{{vu}}"
password: "{{vp}}"
datacenter: "{{dc}}"
validate_certs: no
name: "{{inventory_hostname}}"
disk:
- size_gb: 20
type: thick
datastore: "{{dsi.datastores[0].datastore_cluster}}"
scsi_controller: 0
state: present
delegate_to: localhost
when:
- dsi.datastores[0].datastore_cluster|length > 0
- dsi.datastores[0].freeSpace / dsi.datastores[0].capacity * 100 > 20TASK [add disk space] ***************************************************************************************************
fatal: [cl1vinfspt1000 -> localhost]: FAILED! => {"changed": false, "msg": "Please specify 'unit_number' under disk parameter
at index [0], which is required while creating disk."}--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a04b73d3-c17c-4cf8-a632-8b610d171cf8%40googlegroups.com.
sdir='/sys/class/scsi_generic/sg0/device/driver/'
cd ${sdir} || exit 2
f1=$(ls -d * | grep : | sort -V | head -1)
l1=$(ls -d ${f1%%:*}* | sort -V | tail -1)
n1=${l1%:*}; n1=${n1##*:}
echo $((n1+1))To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a04b73d3-c17c-4cf8-a632-8b610d171cf8%40googlegroups.com.
--Thanks,Abhijeet Kasurde