main.yml
459 Bytes
---
# tasks file for java.restart
- name: restart {{ deploy_path }}
shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh
async: 90
- name: check service runtime
shell: ps -ef|grep java|grep {{ deploy_path }}|grep -v grep|awk '{print $5}'
register: service_runtime
- name: print service uptime
debug: msg="Serivce {{ deploy_path }} last uptime is {{ service_runtime.stdout }}"