Skip to content

Commit 2b92105

Browse files
committed
add default('') to discovered image vars
cifmw_discovered_image_url and cifmw_discovered_hash are set dynamically by the discover_latest_image role. When networking_mapper serializes hostvars early in the play, these variables are not yet defined, causing a fatal undefined variable error. Add | default('') so serialization succeeds; the real values are populated later when discover_latest_image runs. Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: John Fulton <fulton@redhat.com>
1 parent 6a339e4 commit 2b92105

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scenarios/reproducers/va-hci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ cifmw_libvirt_manager_configuration:
7070
uefi: "{{ cifmw_use_uefi }}"
7171
root_part_id: "{{ cifmw_root_partition_id }}"
7272
amount: "{{ [cifmw_libvirt_manager_compute_amount|int, 3] | max }}"
73-
image_url: "{{ cifmw_discovered_image_url }}"
74-
sha256_image_name: "{{ cifmw_discovered_hash }}"
73+
image_url: "{{ cifmw_discovered_image_url | default('') }}"
74+
sha256_image_name: "{{ cifmw_discovered_hash | default('') }}"
7575
image_local_dir: "{{ cifmw_basedir }}/images/"
7676
disk_file_name: "compute-base-os.qcow2"
7777
disksize: "{{ [cifmw_libvirt_manager_compute_disksize|int, 50] | max }}"
@@ -85,8 +85,8 @@ cifmw_libvirt_manager_configuration:
8585
controller:
8686
uefi: "{{ cifmw_use_uefi }}"
8787
root_part_id: "{{ cifmw_root_partition_id }}"
88-
image_url: "{{ cifmw_discovered_image_url }}"
89-
sha256_image_name: "{{ cifmw_discovered_hash }}"
88+
image_url: "{{ cifmw_discovered_image_url | default('') }}"
89+
sha256_image_name: "{{ cifmw_discovered_hash | default('') }}"
9090
image_local_dir: "{{ cifmw_basedir }}/images/"
9191
disk_file_name: "base-os.qcow2"
9292
disksize: 50

0 commit comments

Comments
 (0)