diff options
Diffstat (limited to 'tasks/restart.yml')
-rw-r--r-- | tasks/restart.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tasks/restart.yml b/tasks/restart.yml new file mode 100644 index 0000000..e2a8891 --- /dev/null +++ b/tasks/restart.yml | |||
@@ -0,0 +1,22 @@ | |||
1 | --- | ||
2 | - name: Restart app on Clever-Cloud | ||
3 | shell: "clever restart" | ||
4 | args: | ||
5 | chdir: "{{ clever_app_root }}" | ||
6 | environment: | ||
7 | CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
8 | async: 300 # 5 minutes | ||
9 | poll: 0 | ||
10 | ignore_errors: true | ||
11 | register: clever_deploy | ||
12 | tags: | ||
13 | - skip_ansible_lint | ||
14 | |||
15 | - name: Wait up to 5 minutes for restart completion | ||
16 | async_status: | ||
17 | jid: "{{ clever_deploy.ansible_job_id }}" | ||
18 | register: job_result | ||
19 | until: job_result.finished | ||
20 | ignore_errors: true | ||
21 | delay: 30 | ||
22 | retries: 10 # 5 minutes (10 * 30 secs delay) | ||