Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add -L option for curl during image downloads
Browse files Browse the repository at this point in the history
Some images will be hosted on CDNs that will redirect our attempts with
a 302 reply. By default curl won't follow these, so we would get an
incomplete image download.

Change-Id: Ifc9d72f93f0fc52ed83bc092ca188e4ddf516654
  • Loading branch information
adarazs committed Aug 25, 2016
1 parent 77405e8 commit 2118318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/libvirt/setup/undercloud/tasks/fetch_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# Get the expected checksum for the remote image.
- name: Get image expected checksum
command: >
curl -sf {{ image.url }}.md5
curl -sfL {{ image.url }}.md5
register: md5_expected

- name: Set path to cached image [upstream]
Expand Down Expand Up @@ -80,7 +80,7 @@
# to continue interrupted downloads.
- name: Get image
command: >
curl -sf -C- -o _{{ image.name }}.{{ image.type}} {{ image.url }}
curl -sfL -C- -o _{{ image.name }}.{{ image.type}} {{ image.url }}
args:
chdir: "{{ image_cache_dir }}"
register: curl_result
Expand Down

1 comment on commit 2118318

@halcyondude
Copy link
Contributor

@halcyondude halcyondude commented on 2118318 Aug 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.