]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
environment: re-order projet env & addon env 62/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Thu, 9 Apr 2020 16:50:22 +0000 (18:50 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Thu, 9 Apr 2020 16:52:34 +0000 (18:52 +0200)
By fetching addon environment variables before setting the current
project env variables we allow the project variables to _read_ its
addons' variables.

This can be helpful when you don't control the name of the environment
variables your project is using (and thus want to do a mapping between
the addons variable name exposed by clever to a variable name your
project can understand).

tasks/environment.yml

index 1508ad44eca8171a9908747a2ef07a4e38363a46..5acc0cefca6b6418e25c3135908fdb5dad53abec 100644 (file)
@@ -1,11 +1,11 @@
-- name: Create environment file
-  template:
-    src: env.j2
-    dest: "{{ clever_app_confdir }}/env"
-  no_log: true
-
 - name: Create addons variable file
   include_tasks: addon.yml
   vars:
     addon: "{{ item }}"
   with_items: "{{ clever_addons }}"
+
+- name: Create environment file
+  template:
+    src: env.j2
+    dest: "{{ clever_app_confdir }}/env"
+  no_log: true