Skip to content

Commit

Permalink
feat: add check to ensure netdata service is active before continuing
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Oct 5, 2023
1 parent 285c09f commit ec36c48
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/claim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
name: netdata
state: restarted

- name: "Ensure netdata is in a running state"
ansible.builtin.service:
name: netdata
state: started
register: netdataservicestatus
until: netdataservicestatus.status.ActiveState == "active"
retries: 15
delay: 20

- name: "Get information about netdata agent"
ansible.builtin.command: netdatacli aclk-state json
register: netdata_agent_info
Expand Down

0 comments on commit ec36c48

Please sign in to comment.