diff options
author | paulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com> | 2020-06-17 15:10:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 15:10:45 +0200 |
commit | d5c5bf88290ffb2fbb7835dcfb9c645563cdd3e6 (patch) | |
tree | da182d67325ec1b8ce02a600e6c458229772eece /tasks/redeploy.yml | |
parent | 5816bb884149309b6cfcf438feab7265a14d4c0b (diff) | |
parent | b89d0540672614a5d93da43b317015c3ae8554be (diff) | |
download | ansible-clever-d5c5bf88290ffb2fbb7835dcfb9c645563cdd3e6.tar.gz ansible-clever-d5c5bf88290ffb2fbb7835dcfb9c645563cdd3e6.tar.zst ansible-clever-d5c5bf88290ffb2fbb7835dcfb9c645563cdd3e6.zip |
Merge pull request #63 from paulrbr-fl/upgrade-clever-cliv2.5
deploy: remove custom polling script now that the CLI does it for us
Diffstat (limited to 'tasks/redeploy.yml')
-rw-r--r-- | tasks/redeploy.yml | 33 |
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) | ||