From 5c73bb18f11df46f7648bed3624e6ca6521b74fb Mon Sep 17 00:00:00 2001 From: Bradley Dwyer Date: Tue, 18 May 2021 14:56:29 +1000 Subject: [PATCH] Allow list items under nomad_plugins to avoid modification to lowercase and to correctly quote with double-quotes rather than single. --- templates/client.hcl.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/client.hcl.j2 b/templates/client.hcl.j2 index 3a9b2fb4..18fede1e 100644 --- a/templates/client.hcl.j2 +++ b/templates/client.hcl.j2 @@ -71,7 +71,7 @@ client { {{ plugin_config(value, count=next_count, width=width) }} {{ '}' | indent(count*width, first=True) }} {% else %} -{{ key | indent(count*width, first=True) }} = {% if value is string %}"{{ value }}"{% else %}{{ value | string | lower }}{% endif %} +{{ key | indent(count*width, first=True) }} = {% if value is string %}"{{ value }}"{% elif value is iterable and (value is not string and value is not mapping) -%}[{% set comma = joiner(",") %}{% for item in value %}{{ comma() }}"{{ item | string }}"{% endfor %}]{% else %}{{ value | string | lower }}{% endif %} {% endif %} {% endfor %}