mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
vmware_guest: fix datastore selection on equal sized disks and add tests (#26774)
* Fix datastore selection on equal sized disks and add tests
This commit is contained in:
parent
df321e8579
commit
245a4d30b9
3 changed files with 43 additions and 1 deletions
|
@ -1086,7 +1086,7 @@ class PyVmomiHelper(object):
|
|||
|
||||
datastore_freespace = 0
|
||||
for ds in datastores:
|
||||
if ds.summary.freeSpace > datastore_freespace:
|
||||
if (ds.summary.freeSpace > datastore_freespace) or (ds.summary.freeSpace == datastore_freespace and not datastore):
|
||||
# If datastore field is provided, filter destination datastores
|
||||
if 'datastore' in self.params['disk'][0] and \
|
||||
isinstance(self.params['disk'][0]['datastore'], str) and \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue