summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/tozt/manifests/prometheus.pp4
-rw-r--r--modules/tozt/templates/grafana.ini (renamed from modules/tozt/files/grafana.ini)8
2 files changed, 11 insertions, 1 deletions
diff --git a/modules/tozt/manifests/prometheus.pp b/modules/tozt/manifests/prometheus.pp
index 8120cdc..13bc406 100644
--- a/modules/tozt/manifests/prometheus.pp
+++ b/modules/tozt/manifests/prometheus.pp
@@ -17,8 +17,10 @@ class tozt::prometheus {
source => 'puppet:///modules/tozt/prometheus-override.conf';
}
+ $smtp_password = secret::value("grafana_smtp_password")
+
file { "/etc/grafana.ini":
- source => "puppet:///modules/tozt/grafana.ini",
+ content => template("tozt/grafana.ini"),
require => Package["grafana"];
}
diff --git a/modules/tozt/files/grafana.ini b/modules/tozt/templates/grafana.ini
index 0c13f1c..05bbe24 100644
--- a/modules/tozt/files/grafana.ini
+++ b/modules/tozt/templates/grafana.ini
@@ -11,3 +11,11 @@ user = grafana
[users]
allow_sign_up = false
+
+[smtp]
+enabled = true
+host = mail.tozt.net:587
+user = grafana-noreply@tozt.net
+password = <%= @smtp_password %>
+from_address = grafana-noreply@tozt.net
+startTLS_policy = MandatoryStartTLS