From c264ae3016a77743b7ba4980b558391ab4fc1148 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Mon, 15 Jan 2024 09:22:47 +0100 Subject: [PATCH] Fix download retry when get_url has no status_code. (#10613) (#10791) * Fix download retry when get_url has no status_code. * Fix until clause in download role. Co-authored-by: Romain <58464216+RomainMou@users.noreply.github.com> --- roles/download/tasks/download_file.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/download/tasks/download_file.yml b/roles/download/tasks/download_file.yml index f7f308048..98b9487f5 100644 --- a/roles/download/tasks/download_file.yml +++ b/roles/download/tasks/download_file.yml @@ -103,7 +103,7 @@ become: "{{ not download_localhost }}" until: "'OK' in get_url_result.msg or 'file already exists' in get_url_result.msg or - get_url_result.status_code == 304" + get_url_result.status_code | default() == 304" retries: "{{ download_retries }}" delay: "{{ retry_stagger | default(5) }}" environment: "{{ proxy_env }}"