Correct how the image is matched on the httpd index

Until now, the regexp was trying to match content from the link text,
not href. This may lead to issue depending on the remote httpd
configuration, since it may truncate the link text. Matching the link
href is therefore safer.

Change-Id: I264bad88b2f7bbc8f0b6cc295ca92498fe6e3d49
This commit is contained in:
Cédric Jeanneret 2023-01-26 17:24:56 +01:00
parent c13eb50898
commit 4f6efc3da9
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@
- name: Find qcow2 url
shell: |
sed -n "/qcow2/ s/.*\({{ qcow_prefix }}.*.qcow2\)<\/a>.*/\1/p" {{ tempfile.path }} | tail -1
sed -n "/qcow2/ s/.*href=\"\({{ qcow_prefix }}.*.qcow2\)\">.*/\1/p" {{ tempfile.path }} | tail -1
register: get_qcow_image_name
- name: Remove the file at temporary file path.