install grafana
This commit is contained in:
parent
8da94bd6ce
commit
0da51a9b49
2 changed files with 37 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
- hosts: prometheus_servers
|
||||
roles:
|
||||
- prometheus
|
||||
- grafana
|
||||
|
||||
- hosts: all, !tests,
|
||||
roles:
|
||||
|
|
36
roles/grafana/tasks/main.yml
Normal file
36
roles/grafana/tasks/main.yml
Normal 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
|
Loading…
Reference in a new issue