---

- name: upload iso file to data_domain
  ovirt_disk:
    auth: "{{ ovirt_auth }}"
    name: "{{ iso_file }}"
    upload_image_path: "{{ playbook_dir }}/{{ temp_directory }}/windows_{{ windows_distro_name }}_autounattend_autogen.iso"
    storage_domain: "{{ providers.ovirt.data_domain | default('data_domain') }}"
    size: 20MiB
    wait: true
    bootable: true
    format: raw
    content_type: iso
    force: yes
  register: disk_iso_file

- name: set iso file disk id
  set_fact:
    ks_iso_file_disk_id: "{{ disk_iso_file.disk.id }}"
    ks_iso_file_image_id: "{{ disk_iso_file.disk.image_id }}"
    ovirt_datacenter_id: "{{ disk_iso_file.disk.quota.href | regex_replace('^/ovirt-engine/api/datacenters/(.*)/quotas.*$', '\\1') }}"
    ovirt_datastore_id: "{{ disk_iso_file.disk.storage_domains[0].id }}"