Ansible stop-util ignore reporter kill errors
authorBill Erickson <berickxx@gmail.com>
Mon, 1 Oct 2018 14:01:32 +0000 (10:01 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Keep going when a reporter pid file is found but no such process is
running.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/admin-scripts/ansible/plays/stoputil.yml

index fec9543..00b91bb 100644 (file)
@@ -9,6 +9,8 @@
     shell: 'cat {{reporter_lockfile}}'
     register: reporter_pid
   - name: 'Stopping Reporter pid={{reporter_pid.stdout}}'
+    # 'kill' fails if process is not running
+    ignore_errors: yes
     become: true
     become_user: '{{opensrf_user}}'
     shell: 'kill {{reporter_pid.stdout}}'