Skip to content

Commit d638e6c

Browse files
committed
Refactor resource migration task to ensure resource name is set always after ID retrieval
1 parent 9bcaba4 commit d638e6c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
register: hana_resource_id
5656
failed_when: hana_resource_id.rc != 0
5757
ignore_errors: true
58-
59-
- name: "Test Execution: Set the resource name"
60-
when: hana_resource_id.rc == 0
61-
ansible.builtin.set_fact:
62-
hana_resource_name: "{{ hana_resource_id.stdout }}"
58+
always:
59+
- name: "Test Execution: Set the resource name"
60+
when: hana_resource_id.rc == 0
61+
ansible.builtin.set_fact:
62+
hana_resource_name: "{{ hana_resource_id.stdout }}"
6363

6464
- name: "Test Execution: Move the resource to the targeted node"
6565
ansible.builtin.command: "{{ commands | selectattr(

0 commit comments

Comments
 (0)