From 6c9e26e965b98b7c1d38a3003a5a2c018f896db6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Fri, 22 Mar 2019 16:31:15 +0100 Subject: [PATCH] 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 --- tasks/lxc_install_zypper.yml | 11 ----------- vars/suse.yml | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/tasks/lxc_install_zypper.yml b/tasks/lxc_install_zypper.yml index 4c47f779..fd7a5047 100644 --- a/tasks/lxc_install_zypper.yml +++ b/tasks/lxc_install_zypper.yml @@ -63,14 +63,3 @@ enabled: "yes" tags: - 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 }}" diff --git a/vars/suse.yml b/vars/suse.yml index 66ceb01d..6e0912ae 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -15,8 +15,7 @@ # limitations under the License. _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: "{{ _lxc_hosts_container_image_url_base }}opensuse-leap-image.x86_64-lxc.tar.xz" _lxc_cache_map: distro: opensuse