diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-09-02 20:48:59 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-09-02 20:48:59 +0200 |
commit | b4e6a203893b30e18bc647dc8961820c12c4c32b (patch) | |
tree | e5ab2f2b2f0e874a1e2b56c6b405b44f9a8c3e18 /roles/installer/ubuntu/fetch/tasks/determine-latest-version.yml | |
parent | kubernetes/emc: cosmetic change (diff) |
ubuntu/installer: improved handling of latest image
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 }}" |