aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2020-07-01 11:48:04 +0200
committerClement Delafargue <clement.delafargue@fretlink.com>2020-07-02 11:44:09 +0200
commit45a5c1337b777f34c06d2ce99931414ba9f57ecd (patch)
treebe4ec30d22ee9440d6404e972f4e43d62172c978 /tasks
parentf642276169b56be94e8537458d0ce2286dc71748 (diff)
downloadansible-clever-45a5c1337b777f34c06d2ce99931414ba9f57ecd.tar.gz
ansible-clever-45a5c1337b777f34c06d2ce99931414ba9f57ecd.tar.zst
ansible-clever-45a5c1337b777f34c06d2ce99931414ba9f57ecd.zip
Add support for linking service dependencies
Diffstat (limited to 'tasks')
-rw-r--r--tasks/deploy.yml6
-rw-r--r--tasks/service-dep.yml17
2 files changed, 23 insertions, 0 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml
index ae11921..8dda5e0 100644
--- a/tasks/deploy.yml
+++ b/tasks/deploy.yml
@@ -38,6 +38,12 @@
38 MIN_FLAVOR: "{{ clever_scaling.flavor.min | default('') }}" 38 MIN_FLAVOR: "{{ clever_scaling.flavor.min | default('') }}"
39 MAX_FLAVOR: "{{ clever_scaling.flavor.max | default('') }}" 39 MAX_FLAVOR: "{{ clever_scaling.flavor.max | default('') }}"
40 40
41- name: Configure service dependencies
42 include_tasks: service-dep.yml
43 vars:
44 service_dep: "{{ item }}"
45 with_items: "{{ clever_service_dependencies }}"
46
41- name: Push Environment 47- name: Push Environment
42 shell: "clever env import --json < {{ clever_app_confdir }}/env" 48 shell: "clever env import --json < {{ clever_app_confdir }}/env"
43 args: 49 args:
diff --git a/tasks/service-dep.yml b/tasks/service-dep.yml
new file mode 100644
index 0000000..67621f6
--- /dev/null
+++ b/tasks/service-dep.yml
@@ -0,0 +1,17 @@
1- name: Make sure addon {{ service_dep.addon_id }} is linked
2 shell: >
3 clever service link-addon {{ service_dep.addon_id }}
4 args:
5 chdir: "{{ clever_app_root }}"
6 environment:
7 CONFIGURATION_FILE: "{{ clever_login_file }}"
8 when: service_dep.addon_id is defined
9
10- name: Make sure app {{ service_dep.app_id }} is linked
11 shell: >
12 clever service link-app {{ service_dep.app_id }}
13 args:
14 chdir: "{{ clever_app_root }}"
15 environment:
16 CONFIGURATION_FILE: "{{ clever_login_file }}"
17 when: service_dep.app_id is defined