diff options
Diffstat (limited to 'tasks/restart.yml')
-rw-r--r-- | tasks/restart.yml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tasks/restart.yml b/tasks/restart.yml index e2a8891..1c52032 100644 --- a/tasks/restart.yml +++ b/tasks/restart.yml | |||
@@ -1,6 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | - name: Get current HEAD commit revision | ||
3 | command: "git rev-parse HEAD" # noqa 303 | ||
4 | register: git_head_revision | ||
5 | args: | ||
6 | chdir: "{{ clever_app_root }}" | ||
7 | changed_when: false | ||
8 | |||
2 | - name: Restart app on Clever-Cloud | 9 | - name: Restart app on Clever-Cloud |
3 | shell: "clever restart" | 10 | shell: "clever restart --commit {{ git_head_revision.stdout_lines | first }}" |
4 | args: | 11 | args: |
5 | chdir: "{{ clever_app_root }}" | 12 | chdir: "{{ clever_app_root }}" |
6 | environment: | 13 | environment: |