aboutsummaryrefslogtreecommitdiffstats
path: root/roles/grafana
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-22 21:37:30 +0100
committerbinary <me@rgoncalves.se>2021-01-22 21:37:35 +0100
commit2462acfd5d5a90403fd542ad4afd15e0a04da99f (patch)
tree5dbfe4cd03b65c28c25737ee60066126007136d1 /roles/grafana
parent079cdda94993b0c627d72213f1642f1836e5371a (diff)
downloadinfrastructure-2462acfd5d5a90403fd542ad4afd15e0a04da99f.tar.gz
Enforce grafana data dir
Diffstat (limited to 'roles/grafana')
-rw-r--r--roles/grafana/tasks/main.yml8
-rw-r--r--roles/grafana/vars/main.yml5
2 files changed, 11 insertions, 2 deletions
diff --git a/roles/grafana/tasks/main.yml b/roles/grafana/tasks/main.yml
index 5df8fa3..919f15e 100644
--- a/roles/grafana/tasks/main.yml
+++ b/roles/grafana/tasks/main.yml
@@ -7,6 +7,14 @@
- name: install grafana
package: name=grafana state=present
+- name: ensure grafana dir exists
+ file:
+ path: "{{ grafana_dir }}"
+ owner: "{{ grafana_user }}"
+ group: "{{ grafana_group }}"
+ mode: 0640
+ state: directory
+
- name: generate grafana configuration
template:
src: grafana.ini.j2
diff --git a/roles/grafana/vars/main.yml b/roles/grafana/vars/main.yml
index b980ba8..9e15d9c 100644
--- a/roles/grafana/vars/main.yml
+++ b/roles/grafana/vars/main.yml
@@ -4,10 +4,11 @@
---
+grafana_dir: /data/grafana
grafana_port: 3001
grafana_port_out: 3000
-grafana_user: grafana
-grafana_group: grafana
+grafana_user: _grafana
+grafana_group: _grafana
grafana_db: sqlite
grafana_instance_name: "rgoncalves.se monitoring"
remember that computers suck.