Skip to content

Commit

Permalink
[datadog.conf] Fix ini format of the file (#59)
Browse files Browse the repository at this point in the history
Using the `to_nice_yaml` filter can break the `ini` format of the file.

Use manual formatting instead since there's no filter that offers that
out-of-the-box.
  • Loading branch information
olivielpeau authored Apr 4, 2017
1 parent fdc8390 commit 86e0201
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions templates/datadog.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@

{# These variables are free-style, passed through a hash -#}
{% if datadog_config -%}
{{ datadog_config | to_nice_yaml }}
{% for key, value in datadog_config.items() -%}
{{ key }}: {{ value }}
{% endfor -%}
{% endif %}

{% if datadog_config_ex is defined -%}
{% for section, keyvals in datadog_config_ex.items() %}
[{{ section }}]
{{ keyvals | to_nice_yaml }}
{% for key, value in keyvals.items() -%}
{{ key }}: {{ value }}
{% endfor -%}
{% endfor %}
{% endif %}

0 comments on commit 86e0201

Please sign in to comment.