aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2019-11-25 13:51:24 +0100
committerClement Delafargue <clement.delafargue@fretlink.com>2019-11-27 10:05:18 +0100
commit52ecb5c7e3665d915e48bc8362a92e7ebff06e37 (patch)
tree1a32eba7412161d56cc88818e42300e202e4de40
parent2c2678f3be52d0e4cdba297649d3357e74f3fa82 (diff)
downloadansible-clever-52ecb5c7e3665d915e48bc8362a92e7ebff06e37.tar.gz
ansible-clever-52ecb5c7e3665d915e48bc8362a92e7ebff06e37.tar.zst
ansible-clever-52ecb5c7e3665d915e48bc8362a92e7ebff06e37.zip
Quote env vars to support multiline values
clever-tools now supports multiline env vars. It did so by supporting quotes in the formats it reads from. This commit quotes the exported values using the `tojson` filter. Of course, a better solution would be for clever env to directly read json value, but it's not there yet
-rw-r--r--templates/env.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/env.j2 b/templates/env.j2
index 6ed6469..d2bf446 100644
--- a/templates/env.j2
+++ b/templates/env.j2
@@ -1,3 +1,3 @@
1{% for key, value in (clever_base_env | combine(clever_env)).items() %} 1{% for key, value in (clever_base_env | combine(clever_env)).items() %}
2{{ key }}={{ value }} 2{{ key }}="{{ value | tojson }}"
3{% endfor %} 3{% endfor %}