Browse Source

install grafana

monitoring
histausse 1 year ago
parent
commit
0da51a9b49
Signed by: histausse
GPG Key ID: 67486F107F62E9E9
  1. 1
      books/monitoring.yml
  2. 36
      roles/grafana/tasks/main.yml

1
books/monitoring.yml

@ -3,6 +3,7 @@
- hosts: prometheus_servers
roles:
- prometheus
- grafana
- hosts: all, !tests,
roles:

36
roles/grafana/tasks/main.yml

@ -0,0 +1,36 @@
---
- name: Install apt transport https
apt:
name:
- apt-transport-https
state: latest
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Add Graphana Repo Key
apt_key:
url: https://packages.grafana.com/gpg.key
state: present
- name: Add Grafana Repository
apt_repository:
repo: deb https://packages.grafana.com/oss/deb stable main
state: present
- name: Install Grafana
apt:
name:
- grafana
state: latest
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Enable Grafana
systemd:
name: grafana-server
enabled: true
state: started
Loading…
Cancel
Save