aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2020-06-19 15:39:22 +0200
committerClement Delafargue <clement.delafargue@fretlink.com>2020-06-22 14:41:16 +0200
commit96f02eb1f426c16c631598c80bec4bc0e60f75c1 (patch)
tree36a0cf97bdfea091f673537eef7c5465c97a657c /tasks
parentf39118d499132f017d7f2ec0944bf673b6deb7e9 (diff)
downloadansible-clever-96f02eb1f426c16c631598c80bec4bc0e60f75c1.tar.gz
ansible-clever-96f02eb1f426c16c631598c80bec4bc0e60f75c1.tar.zst
ansible-clever-96f02eb1f426c16c631598c80bec4bc0e60f75c1.zip
Add support for scalability configuration
Closes #52
Diffstat (limited to 'tasks')
-rw-r--r--tasks/deploy.yml14
-rw-r--r--tasks/setup.yml1
2 files changed, 15 insertions, 0 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml
index ca1e54a..c567981 100644
--- a/tasks/deploy.yml
+++ b/tasks/deploy.yml
@@ -24,6 +24,20 @@
24 environment: 24 environment:
25 CONFIGURATION_FILE: "{{ clever_login_file }}" 25 CONFIGURATION_FILE: "{{ clever_login_file }}"
26 26
27- name: Configure Scalability
28 when: clever_scaling is defined
29 command: "{{ ansible_env.HOME }}/{{ clever_user_path }}/clever-set-scalability.sh"
30 args:
31 chdir: "{{ clever_app_root }}"
32 environment:
33 CONFIGURATION_FILE: "{{ clever_login_file }}"
34 INSTANCES: "{{ clever_scaling.instances.fixed | default ('') }}"
35 MIN_INSTANCES: "{{ clever_scaling.instances.min | default('') }}"
36 MAX_INSTANCES: "{{ clever_scaling.instances.max | default('') }}"
37 FLAVOR: "{{ clever_scaling.flavor.fixed | default('') }}"
38 MIN_FLAVOR: "{{ clever_scaling.flavor.min | default('') }}"
39 MAX_FLAVOR: "{{ clever_scaling.flavor.max | default('') }}"
40
27- name: Push Environment 41- name: Push Environment
28 shell: "clever env import --json < {{ clever_app_confdir }}/env" 42 shell: "clever env import --json < {{ clever_app_confdir }}/env"
29 args: 43 args:
diff --git a/tasks/setup.yml b/tasks/setup.yml
index a2d5b90..8a11772 100644
--- a/tasks/setup.yml
+++ b/tasks/setup.yml
@@ -29,3 +29,4 @@
29 with_items: 29 with_items:
30 - clever-set-domain.sh 30 - clever-set-domain.sh
31 - clever-set-drain.sh 31 - clever-set-drain.sh
32 - clever-set-scalability.sh