ansible-role-grafana/templates/grafana.ini.j2

15 lines
428 B
Django/Jinja

# {{ ansible_managed }}
{% for section, options in grafana_config.items() %}
{% if section|lower != 'default' %}
[{{ section }}]
{% endif %}
{% for option, value in options.items() %}
{{ option }} = {% if value is sameas true %}true
{% elif value is sameas false %}false
{% elif value is string %}"{{ value }}"
{% elif value is number %}{{ value }}
{% else %}["{{ value|join('", "') }}"]
{% endif %}
{% endfor %}
{% endfor %}