java.restart-all.yml 5.01 KB
---

#gateway
- hosts: java-gateway
  vars:
    deploy_path: yoho-gateway
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh


#activity
- hosts: java-activity
  vars:
    deploy_path: yohobuy-activity
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#bigdata
- hosts: java-bigdata
  vars:
    deploy_path: yohobuy-bigdata
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#brower
- hosts: java-brower
  vars:
    deploy_path: yohobuy-brower
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#erp-gateway
- hosts: java-erpgateway
  vars:
    deploy_path: yoho-erp-gateway
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#message
- hosts: java-message
  vars:
    deploy_path: yoho-message
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#order
- hosts: java-order
  vars:
    deploy_path: yohobuy-order
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#product
- hosts: java-product
  vars:
    deploy_path: yohobuy-product
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#promotion
- hosts: java-promotion
  vars:
    deploy_path: yohobuy-promotion
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#resources
- hosts: java-resources
  vars:
    deploy_path: yohobuy-resources
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#risk
- hosts: java-risk
  vars:
    deploy_path: yohobuy-risk
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#sns
- hosts: java-sns
  vars:
    deploy_path: yoho-sns
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#uic
- hosts: java-uic
  vars:
    deploy_path: uic
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#sns
- hosts: java-union
  vars:
    deploy_path: yohobuy-union
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#users
- hosts: java-users
  vars:
    deploy_path: yoho-users
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh



#wechat
- hosts: java-wechat
  vars:
    deploy_path: yohobuy-wechat
  remote_user: root
  become: true
  become_method: sudo
  become_user: master
  tasks:
  - name: restart {{ deploy_path }}
    shell: sh /home/master/{{ deploy_path }}/deploy/bin/killws.sh && sh /home/master/{{ deploy_path }}/deploy/bin/startws.sh