This repository has been archived on 2020-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-grafana/templates/grafana.ini.j2

84 lines
1.8 KiB
Django/Jinja

## Server
[server]
protocol = 'http'
http_addr = '{{ ansible_ens10.ipv4.address }}'
http_port = '{{ grafana.listen.port }}'
domain = '{{ grafana.listen.domain }}'
root_url = 'https://{{ grafana.listen.domain }}'
enable_gzip = 'false'
## Database
[database]
type = '{{ grafana.database.type }}'
host = '{{ grafana.database.host }}'
name = '{{ grafana.database.name }}'
user = '{{ grafana.database.user }}'
ssl_mode = "{{ grafana.database.ssl }}"
password = "{{ grafana.database.password }}"
## Remote cache
[remote_cache]
type = '{{ grafana.cache.type }}'
connstr = '{{ grafana.cache.connstr }}'
## Security
[security]
cookie_secure = 'true'
cookie_samesite = 'strict'
## Users
[users]
allow_sign_up = 'false'
## Anonymous auth
[auth]
disable_login_form = 'false'
oauth_auto_login = 'false'
[auth.anonymous]
enabled = 'true'
org_name = 'RedXen'
org_role = 'Viewer'
## LDAP Auth
# [auth.ldap]
# enabled = true
# config_file = /etc/grafana/ldap.toml
# allow_sign_up = true
## OAuth
{% for entry in grafana.auth.generic_oauth %}
[auth.generic_oauth]
name = '{{ entry.name }}'
enabled = '{{ entry.enabled }}'
allow_sign_up = '{{ entry.allow_sign_up }}'
client_id = '{{ entry.client_id }}'
client_secret = '{{ entry.client_secret }}'
scopes = '{{ entry.scopes }}'
auth_url = '{{ entry.auth_url }}'
token_url = '{{ entry.token_url }}'
api_url = '{{ entry.api_url }}'
{% endfor %}
## Session (legacy)
# session_provider = 'redis'
# session_provider_config = 'addr=db_redis:6379,pool_size=100,db=grafana'
# session_cookie_secure = 'true'
## Snapshots
[snapshots]
external_enabled = 'false'
## Alpha panels
[panels]
enable_alpha = 'true'
[smtp]
enabled = 'true'
host = {{ grafana.smtp.host }}
user = {{ grafana.smtp.user }}
password = {{ grafana.smtp.password }}
from_address = {{ grafana.smtp.from }}
startTLS_policy = 'MandatoryStartTLS'