#grafana:
# admin_user: admin
# admin_password: admin
+# You may want to change the default theme to dark
+# default_theme: light
+# If you use email alerting, configure your SMTP connection. If your SMTP Server dos not require authentication, skip smtp_user and smtp_password
+# smtp_enabled: false
+# smtp_host: smtp.mail.example.com:25
+# smtp_user: username
+# smtp_password: password
+# If you like to enable Anonymous login, set auth_anonymous to true
+# auth_anonymous: false
no_log: true
tags: [ini]
+- name: Set grafana default_theme grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: users
+ option: default_theme
+ value: "{{ grafana.default_theme }}"
+ no_log: true
+ tags: [ini]
+
+- name: Set SMTP configuration in grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: smtp
+ option: enabled
+ value: "{{ grafana.smtp_enabled }}"
+ no_log: true
+ tags: [ini]
+
+- name: Set SMTP host in grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: smtp
+ option: host
+ value: "{{ grafana.smtp_host }}"
+ no_log: true
+ tags: [ini]
+ when: grafana.smtp_enabled
+
+- name: Set SMTP user in grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: smtp
+ option: user
+ value: "{{ grafana.smtp_user }}"
+ no_log: true
+ tags: [ini]
+ when: grafana.smtp_enabled and grafana.smtp_user is defined
+
+- name: Set SMTP password in grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: smtp
+ option: password
+ value: "{{ grafana.smtp_password }}"
+ no_log: true
+ tags: [ini]
+ when: grafana.smtp_enabled and grafana.smtp_password is defined
+
+- name: Set anonymous login in grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: auth.anonymous
+ option: enabled
+ value: "{{ grafana.auth_anonymous }}"
+ no_log: true
+ tags: [ini]
+ when: grafana.auth_anonymous
+
- include: grafana_plugins.yml
when:
- devel_mode