Skip to content

Commit cf44c19

Browse files
committed
Refactor kill-message-server.yml to simplify kill command and improve error handling
1 parent 66e4304 commit cf44c19

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/roles/ha_scs/tasks/kill-message-server.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@
3939
failed_when: false
4040

4141
- name: "Test Execution: Kill Message Server Process"
42-
ansible.builtin.shell: |
43-
while true; do
44-
pgrep -f 'ms.sap{{ sap_sid | upper }}' | xargs kill -9 || break
45-
done
42+
ansible.builtin.shell: pgrep -f 'ms.sap{{ sap_sid | upper }}' | xargs kill -9
4643
register: kill_ms_result
47-
failed_when: "'kill: not enough arguments' in kill_ms_result.stderr"
44+
until: "'kill: not enough arguments' in kill_ms_result.stderr"
4845
ignore_errors: true
4946

5047
- name: "Test Execution: Wait for Failover"

0 commit comments

Comments
 (0)