aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorPaul Bonaud <paul.bonaud@fretlink.com>2018-11-22 12:53:20 +0100
committerPaul Bonaud <paul.bonaud@fretlink.com>2018-11-30 15:21:14 +0100
commit07b5852056556aff1bbb3e5945df57cc17b35fad (patch)
tree2d2c3282bc3b2ea15ce9bb99515be9ae9f6028e2 /tasks
parentbada75a98370091f006e4214686a66d04738ae67 (diff)
downloadansible-clever-07b5852056556aff1bbb3e5945df57cc17b35fad.tar.gz
ansible-clever-07b5852056556aff1bbb3e5945df57cc17b35fad.tar.zst
ansible-clever-07b5852056556aff1bbb3e5945df57cc17b35fad.zip
fix(deploy): Make sure stderr logs are defined before using it
Diffstat (limited to 'tasks')
-rw-r--r--tasks/deploy.yml8
1 files changed, 6 insertions, 2 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml
index b6b6358..76da5d7 100644
--- a/tasks/deploy.yml
+++ b/tasks/deploy.yml
@@ -41,17 +41,21 @@
41 chdir: "{{ clever_app_root }}" 41 chdir: "{{ clever_app_root }}"
42 when: 42 when:
43 - clever_deploy is failed 43 - clever_deploy is failed
44 - clever_deploy.stderr is defined
44 - clever_deploy.stderr is search("Failed to read git object") 45 - clever_deploy.stderr is search("Failed to read git object")
45 tags: 46 tags:
46 - skip_ansible_lint 47 - skip_ansible_lint
47 48
48- name: Deploy to Clever-Cloud 49- name: Deploy to Clever-Cloud (after first time push failed)
49 shell: "clever deploy --force" 50 shell: "clever deploy --force"
50 args: 51 args:
51 chdir: "{{ clever_app_root }}" 52 chdir: "{{ clever_app_root }}"
52 environment: 53 environment:
53 CONFIGURATION_FILE: "{{ clever_login_file }}" 54 CONFIGURATION_FILE: "{{ clever_login_file }}"
54 when: clever_deploy is failed 55 when:
56 - clever_deploy is failed
57 - clever_deploy.stderr is defined
58 - clever_deploy.stderr is search("Failed to read git object")
55 register: clever_deploy 59 register: clever_deploy
56 ignore_errors: true 60 ignore_errors: true
57 tags: 61 tags: