diff options
author | paulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com> | 2019-08-01 17:59:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 17:59:08 +0200 |
commit | 2f5efd90d3cfd0986d31f80fdbb56d9af733957b (patch) | |
tree | 876a2c852df1334d2435e40c29524f19ad2f67ed /tasks/deploy.yml | |
parent | e749969ff845089853920647b0da039938a2371c (diff) | |
parent | 5da7f0d812714f9d2af03522d269bd2f462ee939 (diff) | |
download | ansible-clever-2f5efd90d3cfd0986d31f80fdbb56d9af733957b.tar.gz ansible-clever-2f5efd90d3cfd0986d31f80fdbb56d9af733957b.tar.zst ansible-clever-2f5efd90d3cfd0986d31f80fdbb56d9af733957b.zip |
Merge pull request #50 from paulrbr-fl/clever-deploy-back-to-polling
deploy: add a timeout in the polling waiting script
Diffstat (limited to 'tasks/deploy.yml')
-rw-r--r-- | tasks/deploy.yml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml index df02464..d5e5a45 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml | |||
@@ -88,10 +88,21 @@ | |||
88 | jid: "{{ long_command.ansible_job_id }}" | 88 | jid: "{{ long_command.ansible_job_id }}" |
89 | register: job_result | 89 | register: job_result |
90 | until: job_result.finished | 90 | until: job_result.finished |
91 | ignore_errors: true | ||
91 | delay: 30 | 92 | delay: 30 |
92 | retries: 80 # 40 minutes (80 * 30 secs delay) | 93 | retries: 80 # 40 minutes (80 * 30 secs delay) |
93 | 94 | ||
94 | # Output of waiting script stdout | 95 | - name: Waiting script logs (stdout) |
95 | - name: Output waiting script logs | ||
96 | debug: | 96 | debug: |
97 | var: job_result.stdout_lines | 97 | var: job_result.stdout_lines |
98 | when: job_result.stdout_lines is defined | ||
99 | |||
100 | - name: Waiting script logs (stderr) | ||
101 | debug: | ||
102 | var: job_result.stderr_lines | ||
103 | when: job_result.stderr_lines is defined | ||
104 | |||
105 | - name: Fail in case of timeout or failure | ||
106 | fail: | ||
107 | msg: "Deployment failed. Please check logs above." | ||
108 | when: not job_result.finished or not job_result.rc == 0 | ||