Skip to content

Commit 8d28c52

Browse files
committed
Improve error handling in resource ID retrieval by adding pipefail option to shell commands
1 parent ccdd3cc commit 8d28c52

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
block:
3636
- name: "Try master resource ID"
3737
ansible.builtin.shell: >-
38-
{{ commands
38+
set -o pipefail && {{ commands
3939
| selectattr('name','equalto','get_hana_resource_id')
4040
| map(attribute=(ansible_os_family|upper))
4141
| first
@@ -46,7 +46,7 @@
4646
rescue:
4747
- name: "Try clone resource ID"
4848
ansible.builtin.shell: >-
49-
{{ commands
49+
set -o pipefail && {{ commands
5050
| selectattr('name','equalto','get_hana_resource_id')
5151
| map(attribute='REDHAT')
5252
| first

0 commit comments

Comments
 (0)