Add retries to get_url and uri tasks

These tasks occasionally fail in CI, causing jobs to fail.

Change-Id: I89041a641d8cb66c7848fa9ae9264a51aa1e38c8
This commit is contained in:
Mark Goddard 2023-04-20 10:25:36 +01:00
parent 2dc17631cb
commit 2951f26ad1
3 changed files with 15 additions and 0 deletions

View File

@ -17,3 +17,7 @@
mode: 0644
loop: "{{ apt_keys }}"
become: true
register: result
until: result is successful
retries: 3
delay: 5

View File

@ -20,3 +20,7 @@
notify:
- Copy Dell switch BMP images
become: True
register: result
until: result is successful
retries: 3
delay: 5

View File

@ -12,6 +12,9 @@
url: "{{ image_download_checksum_url }}"
return_content: true
register: expected_checksum
until: expected_checksum is successful
retries: 3
delay: 5
when:
- image_download_checksum_url is not none
- image_download_checksum_url != ""
@ -29,6 +32,10 @@
# Always download the image if we have no checksum to compare with.
force: "{{ expected_checksum is skipped }}"
backup: true
register: result
until: result is successful
retries: 3
delay: 5
when:
- image_download_url is not none
- image_download_url != ""