Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vmware_guest_disk: Add iolimit modifications on an existing disk with… (
#1466) vmware_guest_disk: Add iolimit modifications on an existing disk with… SUMMARY This commit add iolimit modifications on an existing disk without changing size. ISSUE TYPE Feature Pull Request COMPONENT NAME plugin community.vmware.vmware_guest_disk ADDITIONAL INFORMATION As of today, one can't change an existing disk iops limit and/or shares level without also changing the disk size. Idempotency is only done on disk size, so task will "ok" whatever iolimit is set to. This commit fix that - name: Gather disk info from virtual machine using name community.vmware.vmware_guest_disk_info: datacenter: "{{ vmware_datacenter }}" hostname: "{{ vmware_vcenter }}" username: "{{ vmware_username }}" password: "{{ vmware_password }}" name: "{{ inventory_hostname }}" delegate_to: localhost register: disk_info - name: Apply iops community.vmware.vmware_guest_disk: datacenter: "{{ vmware_datacenter }}" hostname: "{{ vmware_vcenter }}" username: "{{ vmware_username }}" password: "{{ vmware_password }}" name: "{{ inventory_hostname }}" disk: - filename: '{{ disk_info.guest_disk_info["0"].backing_filename }}' size_gb: "{{ vm_disk_size }}" type: "{{ vm_disk_type }}" datastore: "{{ vm_datastore }}" disk_mode: '{{ disk_info.guest_disk_info["0"].backing_diskmode }}' scsi_controller: '{{ disk_info.guest_disk_info["0"].controller_bus_number }}' unit_number: '{{ disk_info.guest_disk_info["0"].unit_number }}' iolimit: limit: "{{ vm_disk_iops }}" shares: level: normal Reviewed-by: Mario Lenz <[email protected]>
- Loading branch information