Skip to content

Commit ff5bcde

Browse files
authored
Merge pull request #52 from wilfriedroset/fix-new-lines
Fix consul-template.cfg broken newlines
2 parents 944415c + 5a88953 commit ff5bcde

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

templates/consul-template.cfg.j2

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
#jinja2: trim_blocks:False
12
consul = "{{ consul_template_consul_server }}:{{ consul_template_consul_port }}"
2-
{% if consul_template_log_level %}
3+
{% if consul_template_log_level -%}
34
log_level = "{{consul_template_log_level}}"
4-
{% endif %}
5-
{% if consul_template_wait is defined %}
5+
{% endif -%}
6+
{% if consul_template_wait is defined -%}
67
wait = "{{consul_template_wait}}"
7-
{% endif %}
8-
{% if not consul_template_use_config_dir %}
9-
{% if consul_template_templates %}
10-
{% for template in consul_template_templates %}
8+
{% endif -%}
9+
{% if not consul_template_use_config_dir -%}
10+
{% if consul_template_templates -%}
11+
{% for template in consul_template_templates -%}
1112
template {
1213
source = "{{ consul_template_home }}/templates/{{ template.name }}"
1314
destination = "{{ template.dest }}"
1415
{% if template.cmd is defined %}command = "{{ template.cmd }}"{% endif %}
1516
{% if template.perms is defined %}perms = {{ template.perms }}{% endif %}
1617
{% if template.backup is defined %}backup = {{ template.backup|lower }}{% endif %}
1718
{% if template.wait is defined %}wait = {{ template.wait|lower }}{% endif %}
18-
}{% endfor %}
19-
{% endif %}
20-
{% endif %}
19+
}{% endfor -%}
20+
{% endif -%}
21+
{% endif -%}

0 commit comments

Comments
 (0)