aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/redeploy.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/redeploy.yml')
-rw-r--r--tasks/redeploy.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/tasks/redeploy.yml b/tasks/redeploy.yml
new file mode 100644
index 0000000..38068da
--- /dev/null
+++ b/tasks/redeploy.yml
@@ -0,0 +1,33 @@
1---
2##################################################################
3# Re-deploy only if its the first clever deploy for that project #
4##################################################################
5
6- name: First time push to Clever-Cloud needs a full git clone
7 command: "git fetch --unshallow"
8 args:
9 chdir: "{{ clever_app_root }}"
10 tags:
11 - skip_ansible_lint
12
13- name: Deploy to Clever-Cloud
14 shell: "clever deploy --force"
15 args:
16 chdir: "{{ clever_app_root }}"
17 environment:
18 CONFIGURATION_FILE: "{{ clever_login_file }}"
19 async: 2400 # 40 minutes
20 poll: 0
21 ignore_errors: true
22 register: clever_deploy
23 tags:
24 - skip_ansible_lint
25
26- name: Wait up to 40 minutes for deployment completion
27 async_status:
28 jid: "{{ clever_deploy.ansible_job_id }}"
29 register: job_result
30 until: job_result.finished
31 ignore_errors: true
32 delay: 30
33 retries: 80 # 40 minutes (80 * 30 secs delay)