summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml
blob: 0b8cf3f9735d45a38eb3fbf61f481e61451c6227 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
---
- name: downloading SHA256SUMS file for latest release
  uri:
    url: "https://releases.ubuntu.com/{{ ubuntu_installer_codename }}/SHA256SUMS"
    return_content: yes
  register: ubuntu_installer_latest_sha256sums

- name: set version to the latest release
  set_fact:
    ubuntu_installer_version: "{{ ubuntu_installer_latest_sha256sums.content | regex_search('ubuntu-([0-9.]+)-'+ubuntu_installer_variant+'-'+ubuntu_installer_arch+'.iso', '\\1') | first }}"