diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-07-03 03:14:04 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-07-03 03:14:04 -0400 |
commit | bd238d32a0d29978836985ed192bf06b438bfd91 (patch) | |
tree | f9bd81d7042c6c29d29ff133ae819165bad836d6 | |
parent | 39b5bf2489534f41c86cd5ff2872f21e2e0a7f08 (diff) | |
download | puppet-tozt-bd238d32a0d29978836985ed192bf06b438bfd91.tar.gz puppet-tozt-bd238d32a0d29978836985ed192bf06b438bfd91.zip |
enable smtp for grafana
-rw-r--r-- | modules/tozt/manifests/prometheus.pp | 4 | ||||
-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 |