-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrafana_install.yaml
49 lines (40 loc) · 1.23 KB
/
grafana_install.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- hosts: grafana
become: true
tasks:
- name: Check/Install prerequisites, apt-transport-https
apt:
name: apt-transport-https
state: present
update_cache: yes
- name: Check/Install prerequisites, software-properties-common
apt:
name: software-properties-common
state: present
- name: Check/Install prerequisites, wget
apt:
name: wget
state: present
update_cache: yes
- name: add grafana gpg key
shell: wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
warn=false
- name: add grafana stable repo
apt_repository:
repo: deb https://packages.grafana.com/oss/deb stable main
state: present
filename: grafana
- name: Update apt cache
apt: update_cache=yes
- name: Install grafana
apt:
name: grafana
state: present
update_cache: yes
- name: Enable/Start grafana service
service:
name: grafana-server
enabled: yes
state: started
# https://grafana.com/docs/grafana/latest/installation/debian/
# https://grafana.com/grafana/download