From 2d92ec81a35b3c1cec62093edaab5e4dbbe1c763 Mon Sep 17 00:00:00 2001 From: frenzyfriday Date: Mon, 9 Dec 2024 11:28:26 +0100 Subject: [PATCH] Add a fix to enable passing empty cifmw_run_id --- .../tasks/generate_networking_data.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/libvirt_manager/tasks/generate_networking_data.yml b/roles/libvirt_manager/tasks/generate_networking_data.yml index ad61865c8c..77fb0dc5ea 100644 --- a/roles/libvirt_manager/tasks/generate_networking_data.yml +++ b/roles/libvirt_manager/tasks/generate_networking_data.yml @@ -38,10 +38,14 @@ - name: Generate VM list vars: _run_id: >- - {%- if cifmw_architecture_scenario is defined and - cifmw_architecture_scenario | length > 0 -%} - -{{ cifmw_run_id | lower }} - {%- endif -%} + {{ + '-' + (cifmw_run_id | lower) + if ( + cifmw_architecture_scenario is defined and + cifmw_architecture_scenario | length > 0 and + cifmw_run_id | default('') | length > 0 + ) else '' + }} vm_list: >- {% set _vm_list = {} -%} {% set _range = [] -%}