...
|
...
|
@@ -2,9 +2,9 @@ |
|
|
serial: "50%"
|
|
|
remote_user: root
|
|
|
vars:
|
|
|
yoho_services: ['gateway','message','sns','users','social','ufo-fore']
|
|
|
yoho_services: ['gateway','message','sns','users','social']
|
|
|
yohobuy_services: ['activity','bigdata','brower','order','product','promotion','resources','risk','union','wechat']
|
|
|
uniq_services: ['uic','platform-cms','ufo-platform']
|
|
|
uniq_services: ['uic','platform-cms','ufo-platform','ufo-fore']
|
|
|
become: true
|
|
|
become_method: sudo
|
|
|
become_user: master
|
...
|
...
|
@@ -30,13 +30,15 @@ |
|
|
deploy_path: "yoho-erp-gateway"
|
|
|
when: service == "erpgateway"
|
|
|
|
|
|
- name: restart {{ deploy_path }}
|
|
|
shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh
|
|
|
async: 120
|
|
|
|
|
|
- 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 }}" |
|
|
- import_role:
|
|
|
name: 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: 120
|
|
|
#
|
|
|
# - 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 }}" |
...
|
...
|
|