diff options
Diffstat (limited to 'roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml')
-rw-r--r-- | roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml b/roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml new file mode 100644 index 00000000..0b8cf3f9 --- /dev/null +++ b/roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml @@ -0,0 +1,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 }}" |