Skip to content

Commit 9c0f410

Browse files
committed
Enhance validation checks for HANA resource ID before setting the resource name
1 parent 08f4830 commit 9c0f410

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/roles/ha_db_hana/tasks/resource-migration.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@
6161
ignore_errors: true
6262
always:
6363
- name: "Test Execution: Set the resource name"
64-
when: hana_resource_id.rc == 0
64+
when:
65+
- hana_resource_id.rc == 0
66+
- hana_resource_id.stdout is defined
67+
- hana_resource_id.stdout | type_debug != 'NoneType'
68+
- hana_resource_id.stdout | trim | length > 1
6569
ansible.builtin.set_fact:
6670
hana_resource_name: "{{ hana_resource_id.stdout }}"
6771

0 commit comments

Comments
 (0)