VeeamHub / veeam-ansible

Sample code for deploying and configuring various Veeam solutions using Ansible.
GNU Lesser General Public License v3.0
47 stars 18 forks source link

Add ASYNC Task to monitor ISO download. #57

Closed mritsurgeon closed 9 months ago

mritsurgeon commented 1 year ago
- name: Download ISO with Retry (async)
  ansible.windows.win_get_url:
    url: "{{ iso_url }}"
    dest: "{{ destination }}{{ destination_iso_file }}"
    checksum: "{{ iso_checksum }}"
    checksum_algorithm: sha256
    force: true
  retries: 3
  delay: 10
  async: 600 
  poll: 0   
  register: win_get_url_out
  when: (iso_file_info.matched | int) == 0

- name: Check download task status
  async_status:
    jid: "{{ win_get_url_out.ansible_job_id }}"
  register: job_result
  until: job_result.finished
  retries: 60  
  delay: 10
carceneaux commented 11 months ago

Thanks for the suggestion!

carceneaux commented 9 months ago

In the latest release, this feature has now been implemented. I went ahead and applied Async task monitors to the VBR/EM upgrade process as well as these are also long running tasks.

Thanks again for the feedback!