Fix image fetching process for leap 15

The LXC image has a redirection that points to the right image.
We should use it, as aria2 handles it properly.

Change-Id: I61ce494055ab1f7f5bf3b205c34bb9bb131daba6
This commit is contained in:
Jean-Philippe Evrard 2019-03-22 16:31:15 +01:00
parent b7a4e017f1
commit 6c9e26e965
2 changed files with 1 additions and 13 deletions

View File

@ -63,14 +63,3 @@
enabled: "yes" enabled: "yes"
tags: tags:
- lxc_hosts-config - lxc_hosts-config
- name: Determine latest openSUSE container build information (Leap 15)
# Leap 15.0
block:
# NOTE(hwoarang) The build ID changes all the time so we need to have a hack to determine the latest one
# TODO: Talk to openSUSE people to improve that and possibly use the same location for 42.3 as well.
- shell: |
curl -s {{ _lxc_hosts_container_image_url_base }} | grep -P -o '{{ ansible_architecture }}.*?lxc.*?Build.*?xz' | head -n 1
register: _lxc_opensuse_image_build_info
- set_fact:
_lxc_hosts_container_image_url: "{{ _lxc_hosts_container_image_url_base }}opensuse-leap-image.{{ _lxc_opensuse_image_build_info.stdout }}"

View File

@ -15,8 +15,7 @@
# limitations under the License. # limitations under the License.
_lxc_hosts_container_image_url_base: "https://download.opensuse.org/repositories/Virtualization:/containers:/images:/openSUSE-Leap-{{ ansible_distribution_version }}/containers/" _lxc_hosts_container_image_url_base: "https://download.opensuse.org/repositories/Virtualization:/containers:/images:/openSUSE-Leap-{{ ansible_distribution_version }}/containers/"
#this gets overriden anyway _lxc_hosts_container_image_url: "{{ _lxc_hosts_container_image_url_base }}opensuse-leap-image.x86_64-lxc.tar.xz"
_lxc_hosts_container_image_url: ""
_lxc_cache_map: _lxc_cache_map:
distro: opensuse distro: opensuse