diff --git a/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml b/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml index 449694c42..1aad4a2b0 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml @@ -27,7 +27,11 @@ mode: "0644" - name: "Extract deployment image checksum" - command: awk '/{{ deploy_image_upstream_url | basename }}|^[a-z0-9]+$/{print $1}' {{ http_boot_folder }}/{{ deploy_image_filename }}-checksum.CHECKSUMS + shell: + cmd: | + set -o pipefail + grep "{{ deploy_image_upstream_url | basename }}" {{ http_boot_folder }}/{{ deploy_image_filename }}-checksum.CHECKSUMS | grep -owE "[[:xdigit:]]{32,64}" + executable: /bin/bash register: parsed_deployment_image_checksum failed_when: parsed_deployment_image_checksum is failed or not parsed_deployment_image_checksum.stdout diff --git a/releasenotes/notes/fixes-checksum-parsing-82c04ff1bb575c51.yaml b/releasenotes/notes/fixes-checksum-parsing-82c04ff1bb575c51.yaml new file mode 100644 index 000000000..3a0d05926 --- /dev/null +++ b/releasenotes/notes/fixes-checksum-parsing-82c04ff1bb575c51.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with checksum verification when setting + ``upstream_deploy_image_distribution`` to ``rocky`` or + ``cirros``.