summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu/fetch/tasks/fetch-version.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-09-02 20:48:59 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-09-02 20:48:59 +0200
commitb4e6a203893b30e18bc647dc8961820c12c4c32b (patch)
treee5ab2f2b2f0e874a1e2b56c6b405b44f9a8c3e18 /roles/installer/ubuntu/fetch/tasks/fetch-version.yml
parentkubernetes/emc: cosmetic change (diff)
ubuntu/installer: improved handling of latest image
Diffstat (limited to 'roles/installer/ubuntu/fetch/tasks/fetch-version.yml')
-rw-r--r--roles/installer/ubuntu/fetch/tasks/fetch-version.yml41
1 files changed, 0 insertions, 41 deletions
diff --git a/roles/installer/ubuntu/fetch/tasks/fetch-version.yml b/roles/installer/ubuntu/fetch/tasks/fetch-version.yml
deleted file mode 100644
index 868adc95..00000000
--- a/roles/installer/ubuntu/fetch/tasks/fetch-version.yml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-## we need to try old-releases.ubuntu.com first because otherwise it would be impossible to download the initial release
-## of any codename release. (i.e. 20.04)
-- name: try downloading SHA256SUMS and signature file from old-releases.ubuntu.com
- loop:
- - SHA256SUMS
- - SHA256SUMS.gpg
- get_url:
- url: "https://old-releases.ubuntu.com/releases/{{ ubuntu_installer_version }}/{{ item }}"
- dest: "{{ ubuntu_installer_target_dir }}/{{ item }}"
- force: yes
- register: ubuntu_installer_old
- failed_when: "'status_code' in ubuntu_installer_old and ubuntu_installer_old.status_code not in [200, 404]"
-
-- when: 404 not in (ubuntu_installer_old.results | selectattr('status_code', 'defined') | map(attribute='status_code') | list)
- block:
- - name: check if SHA256SUM actually contains the correct iso
- command: grep -E '^[0-9a-z]{64}\s+\*ubuntu-{{ ubuntu_installer_version }}-{{ ubuntu_installer_variant }}-{{ ubuntu_installer_arch }}.iso$' "{{ ubuntu_installer_target_dir }}/SHA256SUMS"
- changed_when: false
- failed_when: false
- register: ubuntu_installer_old_sha256sum
-
- - name: set download url to old-releases.ubuntu.com
- when: (ubuntu_installer_old_sha256sum.stdout_lines | length) > 0
- set_fact:
- ubuntu_installer_base_url: "https://old-releases.ubuntu.com/releases/{{ ubuntu_installer_version }}"
-
-- when: ubuntu_installer_base_url is not defined
- block:
- - name: try downloading SHA256SUMS and signature file from releases.ubuntu.com
- loop:
- - SHA256SUMS
- - SHA256SUMS.gpg
- get_url:
- url: "https://releases.ubuntu.com/{{ ubuntu_installer_version }}/{{ item }}"
- dest: "{{ ubuntu_installer_target_dir }}/{{ item }}"
- force: yes
-
- - name: set download url to releases.ubuntu.com
- set_fact:
- ubuntu_installer_base_url: "https://releases.ubuntu.com/{{ ubuntu_installer_version }}"