From 244339e70a1be830ac02306e1feb4383fe73572b Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Thu, 18 Jun 2020 16:09:46 +0200 Subject: Use JSON import for environment variables The env can be provided as a JSON list `[{"name": "PORT", "value": "8080"}]`. The `dict2items` filter provided by ansible is _almost_ what we want, but it keeps the value original types (a boolean is kept as a boolean in the JSON value). Since environment variables are strings and `clever-tools` does not want to make the implicit coercion for us, we need to do it ourselves. --- tasks/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 4d4ecaa..751d78f 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -17,7 +17,7 @@ CONFIGURATION_FILE: "{{ clever_login_file }}" - name: Push Environment - shell: "clever env import < {{ clever_app_confdir }}/env" + shell: "clever env import --json < {{ clever_app_confdir }}/env" args: chdir: "{{ clever_app_root }}" environment: -- cgit v1.2.3