---

- name: export template to export domain
  ovirt_template:
    auth: "{{ ovirt_auth }}"
    state: exported
    name: "{{ template.name }}"
    export_domain: "{{ providers.ovirt.export_domain }}"
    cluster: "{{ providers.ovirt.cluster }}"
  async: 7200
  poll: 0
  register: export_ovf_file

- name: wait for export to complete
  async_status:
    jid: "{{ export_ovf_file.ansible_job_id }}"
  register: ovf
  until: ovf.finished
  retries: "{{ instance_wait_retry_limit }}"
  delay: 10