Skip to content

Commit

Permalink
Add retries to get_url and uri tasks
Browse files Browse the repository at this point in the history
These tasks occasionally fail in CI, causing jobs to fail.

Change-Id: I89041a641d8cb66c7848fa9ae9264a51aa1e38c8
(cherry picked from commit 2951f26)
  • Loading branch information
markgoddard committed Nov 6, 2023
1 parent b8ac9ce commit 9b8ed55
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/roles/apt/tasks/keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
mode: 0644
loop: "{{ apt_keys }}"
become: true
register: result
until: result is successful
retries: 3
delay: 5
4 changes: 4 additions & 0 deletions ansible/roles/dell-switch-bmp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
notify:
- Copy Dell switch BMP images
become: True
register: result
until: result is successful
retries: 3
delay: 5
7 changes: 7 additions & 0 deletions ansible/roles/image-download/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != ""
Expand All @@ -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 != ""
Expand Down

0 comments on commit 9b8ed55

Please sign in to comment.