Skip to content

Commit

Permalink
Stop all the previous services in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
aminst committed Dec 5, 2023
1 parent b5ad6bf commit 302eb28
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions deploy/ansible/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,9 @@
delegate_to: "{{ item.deploy_host }}"
with_items: "{{ oramnode_endpoints.endpoints }}"

- name: Stop oramnode services
ansible.builtin.systemd:
name: "oblishard-oramnode-{{ item.id }}-{{ item.replicaid }}"
state: stopped
daemon_reload: true
delegate_to: "{{ item.deploy_host }}"
with_items: "{{ oramnode_endpoints.endpoints }}"
- name: Stop previous services
ansible.builtin.shell:
cmd: systemctl stop oblishard-*

- name: Start oramnode services
ansible.builtin.systemd:
Expand All @@ -189,14 +185,6 @@
delegate_to: "{{ item.deploy_host }}"
with_items: "{{ shardnode_endpoints.endpoints }}"

- name: Stop shardnode services
ansible.builtin.systemd:
name: "oblishard-shardnode-{{ item.id }}-{{ item.replicaid }}"
state: stopped
daemon_reload: true
delegate_to: "{{ item.deploy_host }}"
with_items: "{{ shardnode_endpoints.endpoints }}"

- name: Start shardnode services
ansible.builtin.systemd:
name: "oblishard-shardnode-{{ item.id }}-{{ item.replicaid }}"
Expand All @@ -214,14 +202,6 @@
delegate_to: "{{ item.deploy_host }}"
with_items: "{{ router_endpoints.endpoints }}"

- name: Stop router services
ansible.builtin.systemd:
name: "oblishard-router-{{ item.id }}"
state: stopped
daemon_reload: true
delegate_to: "{{ item.deploy_host }}"
with_items: "{{ router_endpoints.endpoints }}"

- name: Start router services
ansible.builtin.systemd:
name: "oblishard-router-{{ item.id }}"
Expand Down

0 comments on commit 302eb28

Please sign in to comment.