Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
fix #20 make healtheck after restart (#21)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Nemirowski <[email protected]>
  • Loading branch information
sergio authored Mar 31, 2022
1 parent 530e7b5 commit 5470f68
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
5 changes: 1 addition & 4 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---

- name: Restart NeoFS IR service
ansible.builtin.systemd:
name: "neofs-ir{{ neofs_ir__instance }}.service"
state: 'restarted'
daemon_reload: yes
ansible.builtin.include_tasks: 'restart.yml'
16 changes: 16 additions & 0 deletions handlers/restart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

- name: Restart NeoFS IR systemd service
ansible.builtin.systemd:
name: "neofs-ir{{ neofs_ir__instance }}.service"
state: 'restarted'
daemon_reload: yes

- name: Waiting for node up
ansible.builtin.shell:
cmd: "{{ neofs_ir__cli_bin_path }} control healthcheck -c {{ neofs_ir__control_api_config_path }} --ir"
changed_when: False
register: _neofs_ir_check_result
until: _neofs_ir_check_result.rc == 0
retries: 10
delay: 30
9 changes: 0 additions & 9 deletions tasks/healthcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,3 @@
owner: 'root'
group: "{{ neofs_ir__group }}"
mode: '0640'

- name: Waiting for node up
ansible.builtin.shell: |
{{ neofs_ir__cli_bin_path }} control healthcheck -c {{ neofs_ir__control_api_config_path }} --ir
changed_when: False
register: _neofs_ir_check_result
until: _neofs_ir_check_result.rc == 0
retries: 10
delay: 30

0 comments on commit 5470f68

Please sign in to comment.