monitoring-server/tasks/main.yml

37 lines
637 B
YAML
Raw Permalink Normal View History

2021-01-04 22:30:50 +01:00
---
- name: Install prometheus and grafana
community.general.pacman:
state: present
name:
- prometheus
- grafana
- name: Install prometheus conf
copy:
dest: /etc/prometheus/prometheus.yml
src: prometheus.yml
- name: Install prometheus custom args
copy:
dest: /etc/conf.d/prometheus
src: prometheus
- name: Enable prometheus
systemd:
enabled: true
state: started
name: prometheus
- name: Install grafana conf
template:
src: grafana.ini.j2
dest: /etc/grafana.ini
mode: 0644
- name: Enable grafana
systemd:
enabled: true
state: started
name: grafana