[download] Don't fail on 304 Not Modified (#10452)

i.e when file was not modified since last download
pull/10466/head
Mathieu Parent 2023-09-21 09:20:20 +02:00 committed by GitHub
parent fe4b1f6dee
commit 09f3caedaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@
run_once: "{{ download_force_cache }}"
register: get_url_result
become: "{{ not download_localhost }}"
until: "'OK' in get_url_result.msg or 'file already exists' in get_url_result.msg"
until: "'OK' in get_url_result.msg or
'file already exists' in get_url_result.msg or
get_url_result.status_code == 304"
retries: "{{ download_retries }}"
delay: "{{ retry_stagger | default(5) }}"
environment: "{{ proxy_env }}"