Merge "collect-container-logs: don't copy on failure"
This commit is contained in:
commit
0fcc5ff5ac
@ -1,14 +1,14 @@
|
||||
- name: List containers
|
||||
command: "{{ container_command }} ps -a --format '{{ '{{ .Names }}' }}'"
|
||||
register: docker_containers
|
||||
failed_when: false
|
||||
|
||||
- name: Create container log dir
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/zuul-output/logs/{{ container_command }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: List containers
|
||||
command: "{{ container_command }} ps -a --format '{{ '{{ .Names }}' }}'"
|
||||
register: docker_containers
|
||||
failed_when: false
|
||||
|
||||
- name: Save container logs
|
||||
loop: "{{ docker_containers.stdout_lines | default([]) }}"
|
||||
# We can't use the default 'item' because roles may be used in
|
||||
@ -19,6 +19,7 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
failed_when: false
|
||||
when: docker_containers.rc == 0
|
||||
|
||||
- name: Open container logs permissions
|
||||
file:
|
||||
|
Loading…
Reference in New Issue
Block a user