Skip to content

Commit 4a2feaa

Browse files
committed
Refactor kill sapstartsrv process execution to standardize quoting in shell commands and remove unnecessary result logging
1 parent 33fde42 commit 4a2feaa

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/roles/ha_scs/tasks/kill-sapstartsrv-process.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
failed_when: sapstartsrv_pid.stdout == ""
4040

4141
- name: "Test Execution: Kill sapstartsrv Process"
42-
ansible.builtin.shell: echo "{{ sapstartsrv_pid.stdout_lines | join(' ') }}" | xargs -r kill -9
42+
ansible.builtin.shell: echo '{{ sapstartsrv_pid.stdout_lines | join(" ") }}' | xargs -r kill -9
4343
register: kill_sapstartsrv_result
4444
failed_when: false
4545

@@ -48,7 +48,7 @@
4848
timeout: 30
4949

5050
- name: "Test Execution: Find sapstartsrv PID after killing the process"
51-
ansible.builtin.shell: pgrep -fl "ASCS{{ scs_instance_number }}.*sapstartsrv" | awk '{print $1}'
51+
ansible.builtin.shell: pgrep -fl 'ASCS{{ scs_instance_number }}.*sapstartsrv' | awk '{print $1}'
5252
register: sapstartsrv_pid_after_kill
5353
failed_when: sapstartsrv_pid_after_kill.stdout == ""
5454

@@ -88,7 +88,6 @@
8888
"Pre Validations: Validate SCS cluster status": "{{ cluster_status_pre }}",
8989
"Pre Validations: CleanUp any failed resource": "{{ cleanup_failed_resource_pre }}",
9090
"Test Execution: Find sapstartsrv PID": "{{ sapstartsrv_pid }}",
91-
"Test Execution: Kill sapstartsrv Process": "{{ kill_sapstartsrv_result }}",
9291
"Test Execution: Find sapstartsrv PID after killing the process": "{{ sapstartsrv_pid_after_kill }}",
9392
"Post Validations Result": "{{ cluster_status_test_execution }}",
9493
}

0 commit comments

Comments
 (0)