diff options
author | Clement Delafargue <clement.delafargue@fretlink.com> | 2020-06-18 16:09:46 +0200 |
---|---|---|
committer | Clement Delafargue <clement.delafargue@fretlink.com> | 2020-06-19 10:18:47 +0200 |
commit | 244339e70a1be830ac02306e1feb4383fe73572b (patch) | |
tree | 96f1b623c151d32d9d0418a9dfc9c45695a2bd41 /tasks | |
parent | d5c5bf88290ffb2fbb7835dcfb9c645563cdd3e6 (diff) | |
download | ansible-clever-244339e70a1be830ac02306e1feb4383fe73572b.tar.gz ansible-clever-244339e70a1be830ac02306e1feb4383fe73572b.tar.zst ansible-clever-244339e70a1be830ac02306e1feb4383fe73572b.zip |
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.
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/deploy.yml | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ | |||
17 | CONFIGURATION_FILE: "{{ clever_login_file }}" | 17 | CONFIGURATION_FILE: "{{ clever_login_file }}" |
18 | 18 | ||
19 | - name: Push Environment | 19 | - name: Push Environment |
20 | shell: "clever env import < {{ clever_app_confdir }}/env" | 20 | shell: "clever env import --json < {{ clever_app_confdir }}/env" |
21 | args: | 21 | args: |
22 | chdir: "{{ clever_app_root }}" | 22 | chdir: "{{ clever_app_root }}" |
23 | environment: | 23 | environment: |