On Thu, Oct 3, 2019 at 6:55 AM Eyal Shenitzky <eshenitz@redhat.com> wrote:
You can use the update_storage_domains action.
According to the action implementation [1], it seems that you need to specify where you want the disk to appear (in which storage domains).

For example:
If the disks already reside on sd1 and you want to copy it to sd2, you need to specify both sd1 and sd2.

[1] https://github.com/ansible/ansible/blob/25ac7042b070b22c5377f7a43399c19060a38966/lib/ansible/modules/cloud/ovirt/ovirt_disk.py#L532
[2] - https://docs.ansible.com/ansible/latest/modules/ovirt_disk_module.html



--
Regards,
Eyal Shenitzky


I can try, thanks.
But is it supported on block based storage such as iSCSI or FC?
I see this in your [1] above
"
# We don't support move&copy for non file based storages:
if disk.storage_type != otypes.DiskStorageType.IMAGE:
    return changed
"

Also it is not clear in my opinion the action connected to the different "state" possibilities: present/absent/attached/detached
In web admin gui I can have a disk active on a VM and I can:

- deactivate the disk 
I see red down arrow for the disk that remains associated with the VM

- remove the disk
a) remove permanently removes the disk from storage
b) if I don't select "remove permanently" the disk goes into the floating disks list

How do they map with Ansible module state options?

Gianluca 
Gianluca