Use image_fetch_dir in fetch-image role

Use image_fetch_dir in fetch-image role to download images there

Change-Id: Ic8df12dde8184455059bbc14a2cca8e7104088a5
This commit is contained in:
Sagi Shnaidman 2017-02-07 22:26:49 +02:00
parent 1ad25e1bd3
commit 5b9cfccd90
2 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,8 @@ working_dir: "/home/{{ undercloud_user }}"
# undercloud image.
image_cache_dir: "/var/cache/tripleo-quickstart/images"
image_fetch_dir: "{{ working_dir}}"
# This determines whether to download a pre-built undercloud.qcow2 or
# whether to instead use an overcloud-full.qcow2 and convert it on
# the fly. The default is to use a pre-built undercloud.qcow2.

View File

@ -123,17 +123,17 @@
when: image_fetch_failed|default(false)
# Use `image_cache_path`, which was set by one of the above tasks, and
# copy it to `undercloud.qcow2 in our `{{ working_dir }}`.
# copy it to `undercloud.qcow2 in our `{{ image_fetch_dir }}`.
- name: Get qcow2 image from cache
command: >
cp {{ image_cache_path }} {{ working_dir }}/{{ image.name }}.{{ image.type }}
cp {{ image_cache_path }} {{ image_fetch_dir }}/{{ image.name }}.{{ image.type }}
when: image.type == "qcow2"
- name: Get tar images from cache
unarchive:
src: "{{ image_cache_path }}"
copy: no
dest: "{{ working_dir }}"
dest: "{{ image_fetch_dir }}"
list_files: yes
when: image.type == "tar"