install grafana

This commit is contained in:
histausse 2021-09-22 15:05:43 +02:00
parent 8da94bd6ce
commit 0da51a9b49
Signed by: histausse
GPG key ID: 67486F107F62E9E9
2 changed files with 37 additions and 0 deletions

View file

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

View file

@ -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