kolla-ansible/ansible/roles/grafana/templates/grafana.ini.j2
Doug Szumski b8979c2083 Support configuring grafana local admin username
The grafana local admin username can be configured by overriding
the admin user field in the grafana.ini file. However, this will
fail when kolla-ansible attempts to configure any enabled
datasources for grafana because the local admin password is
hardcoded to 'admin'. This change allows the grafana local admin
password to be configured via group vars so that the correct
username is used when configuring datasources.

Closes-Bug: #1750408
Change-Id: I0962200894f7a0452da1c249a68f9230b6fab13f
2018-02-19 16:58:50 +00:00

40 lines
878 B
Django/Jinja

[paths]
data = /var/lib/grafana
logs = /var/log/kolla/grafana
plugins = /var/lib/grafana/plugins
[server]
protocol = http
http_addr = {{ api_interface_address }}
http_port = {{ grafana_server_port }}
router_logging = true
static_root_path = public
enable_gzip = false
[database]
type = mysql
host = {{ grafana_database_address }}
name = {{ grafana_database_name }}
user = {{ grafana_database_user }}
password = {{ grafana_database_password }}
ssl_mode = disable
[session]
provider = mysql
provider_config = {{ grafana_database_user }}:{{ grafana_database_password }}@tcp({{ grafana_database_address }})/{{ grafana_database_name }}
cookie_name = grafana_sess
cookie_secure = false
session_life_time = 86400
[analytics]
reporting_enabled = false
check_for_updates = false
[security]
admin_user = {{ grafana_admin_username }}
admin_password = {{ grafana_admin_password }}