ansible-nas/roles/healthchecks.io/tasks/main.yml

20 lines
521 B
YAML
Raw Normal View History

---
- name: Start Healthchecks
block:
- name: Add healthchecks.io cronjob
ansible.builtin.cron:
name: healthchecks.io
minute: "*/{{ healthchecks_ping_minutes }}"
user: root
job: "curl -m 10 --retry 5 {{ healthchecks_url }}"
when: healthchecks_enabled is true
- name: Stop Healthchecks
block:
- name: Remove healthchecks.io cronjob
ansible.builtin.cron:
name: healthchecks.io
user: root
state: absent
when: healthchecks_enabled is false