From a7da59703f911b291d2cdbe3e3f82964cc01f5ef Mon Sep 17 00:00:00 2001 From: Albin Vass Date: Mon, 27 Apr 2020 20:53:45 +0200 Subject: [PATCH] container-logs: use failed_when: instead of ignore_errors: Change-Id: I3b59c126b8d1dff38eef40003e3c63846dec959a --- roles/collect-container-logs/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/collect-container-logs/tasks/main.yaml b/roles/collect-container-logs/tasks/main.yaml index beb658efd..d5a3e8fb7 100644 --- a/roles/collect-container-logs/tasks/main.yaml +++ b/roles/collect-container-logs/tasks/main.yaml @@ -1,7 +1,7 @@ - name: List containers command: "{{ container_command }} ps -a --format '{{ '{{ .Names }}' }}'" register: docker_containers - ignore_errors: true + failed_when: false - name: Create container log dir file: @@ -17,7 +17,7 @@ shell: "{{ container_command }} logs {{ zj_container_name }} &> {{ ansible_user_dir }}/zuul-output/logs/{{ container_command }}/{{ zj_container_name }}.txt" args: executable: /bin/bash - ignore_errors: true + failed_when: false - name: Open container logs permissions file: