1
0
forked from infra/ansible
infra/roles/prometheus/tasks/main.yml

16 lines
441 B
YAML

---
- name: Check OS release
fail: msg="This role is only supported on Debian buster"
when: not (ansible_distribution == 'Debian' and ansible_distribution_release == 'buster')
- name: Install prometheus
apt: name=prometheus
- name: Configure prometheus
template: src=prometheus.yml.j2 dest=/etc/prometheus/prometheus.yml
notify: Restart prometheus
- name: Enable prometheus
service: name=prometheus state=started enabled=yes