Skip to content

Commit

Permalink
Fix sectionless items edge case (#303)
Browse files Browse the repository at this point in the history
Co-authored-by: Ishan Jain <51803183+ishanjainn@users.noreply.github.com>
  • Loading branch information
santilococo and ishanjainn authored Jan 29, 2025
1 parent 9b7ddc9 commit e5fa9cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions roles/grafana/templates/grafana.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# http://docs.grafana.org/installation/configuration
# https://github.com/grafana/grafana/blob/master/conf/sample.ini

{% for k, v in grafana_ini.items() %}
{% if v is not mapping %}
{{ k }} = {{ v }}
{% endif %}
{% endfor %}

{% for section, items in grafana_ini.items() %}
{% if items is mapping %}
[{{ section }}]
Expand All @@ -17,8 +23,6 @@
{{ sub_key }} = {{ sub_value }}
{% endif %}
{% endfor %}
{% else %}
{{ section }} = {{ items }}
{% endif %}

{% endfor %}

0 comments on commit e5fa9cd

Please sign in to comment.