Merge "Fix image fetching process for leap 15"

This commit is contained in:
Zuul 2019-04-23 20:35:02 +00:00 committed by Gerrit Code Review
commit b5ec1c7eb8
2 changed files with 12 additions and 1 deletions

View File

@ -63,3 +63,12 @@
enabled: "yes"
tags:
- lxc_hosts-config
- name: Determine latest openSUSE container build information (Leap 15)
# NOTE(hwoarang) The build ID changes all the time so we need to have a hack to determine the latest one
# NOTE(evrardjp) You can still build using your own image by setting lxc_hosts_container_image_url in user_variables.
# NOTE(noonedeadpunk) While suse has static metalink which allows to get to the most recent build,
# aria2c do not save files provided by metalinks under expected names, as --out do not work for them.
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

View File

@ -15,7 +15,9 @@
# 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: "{{ _lxc_hosts_container_image_url_base }}opensuse-leap-image.x86_64-lxc.tar.xz"
# If you want to specify your own image when using SUSE, please override
# in your extra variables lxc_hosts_container_image_url.
_lxc_hosts_container_image_url: "{{ _lxc_hosts_container_image_url_base }}opensuse-leap-image.{{ _lxc_opensuse_image_build_info.stdout }}"
_lxc_cache_map:
distro: opensuse