From d8fb1a9cf2a3d0d78eccb4ecc7351211ca2472c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Garc=C3=ADa?= Date: Wed, 7 Mar 2018 15:26:31 +0100 Subject: [PATCH 1/2] remove empty brackets from datadog.yaml when datadog_config is empty --- templates/datadog.yaml.j2 | 2 ++ tests/readme.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/datadog.yaml.j2 b/templates/datadog.yaml.j2 index 2eeba6cb..d002eb7b 100644 --- a/templates/datadog.yaml.j2 +++ b/templates/datadog.yaml.j2 @@ -8,4 +8,6 @@ dd_url: {{ datadog_url | default('https://app.datadoghq.com') }} api_key: {{ datadog_api_key | default('youshouldsetthis') }} {% endif %} +{% if datadog_config is defined and datadog_config|length > 0 -%} {{ datadog_config | to_nice_yaml }} +{% endif %} \ No newline at end of file diff --git a/tests/readme.md b/tests/readme.md index dcd8d3e2..79d24bdf 100644 --- a/tests/readme.md +++ b/tests/readme.md @@ -5,7 +5,7 @@ This is an example setup, based on vagrant + virtualbox, that allows to easily r # Requirements - vagrant > 2.0.0 -- vitrualbox > 5.1.28 +- virtualbox > 5.1.28 # Setup From 977dd7746f9156c1de9c974ed7b7f927b991dfe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Garc=C3=ADa?= Date: Wed, 7 Mar 2018 15:31:31 +0100 Subject: [PATCH 2/2] add newline at end of document --- templates/datadog.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/datadog.yaml.j2 b/templates/datadog.yaml.j2 index d002eb7b..91d258ed 100644 --- a/templates/datadog.yaml.j2 +++ b/templates/datadog.yaml.j2 @@ -10,4 +10,4 @@ api_key: {{ datadog_api_key | default('youshouldsetthis') }} {% if datadog_config is defined and datadog_config|length > 0 -%} {{ datadog_config | to_nice_yaml }} -{% endif %} \ No newline at end of file +{% endif %}