From bd871b3dcd710e1d950f28550a0a5ba43faf8817 Mon Sep 17 00:00:00 2001 From: Francois RIGAULT Date: Wed, 3 Mar 2021 21:46:36 +0100 Subject: [PATCH] Relax format of checksum file Allow a file with only a single checksum inside to be provided as checksum file. This is handy for some (at least one well known) artefact repositories that automatically produce a .sha256 file for any object uploaded. Change-Id: Ibf4576be0aa93dfca94cf759b9166b57df168347 --- .../roles/bifrost-ironic-install/tasks/download_ipa_image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml b/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml index 38b35178c..71ac420d7 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml @@ -30,7 +30,7 @@ mode: 0644 - name: "Extract IPA kernel checksum" - command: awk '/{{ ipa_kernel_upstream_url | basename }}/{print $1}' "{{ ipa_kernel }}.{{ ipa_kernel_upstream_checksum_algo }}" + command: awk '/{{ ipa_kernel_upstream_url | basename }}|^[a-z0-9]+$/{print $1}' "{{ ipa_kernel }}.{{ ipa_kernel_upstream_checksum_algo }}" register: parsed_ipa_kernel_checksum failed_when: parsed_ipa_kernel_checksum is failed or not parsed_ipa_kernel_checksum.stdout @@ -73,7 +73,7 @@ mode: 0644 - name: "Extract IPA ramdisk checksum" - command: awk '/{{ ipa_ramdisk_upstream_url | basename }}/{print $1}' "{{ ipa_ramdisk }}.{{ ipa_ramdisk_upstream_checksum_algo }}" + command: awk '/{{ ipa_ramdisk_upstream_url | basename }}|^[a-z0-9]+$/{print $1}' "{{ ipa_ramdisk }}.{{ ipa_ramdisk_upstream_checksum_algo }}" register: parsed_ipa_ramdisk_checksum failed_when: parsed_ipa_ramdisk_checksum is failed or not parsed_ipa_ramdisk_checksum.stdout