Merge "container-logs: use failed_when: instead of ignore_errors:"
This commit is contained in:
commit
64b347fa63
@ -1,7 +1,7 @@
|
|||||||
- name: List containers
|
- name: List containers
|
||||||
command: "{{ container_command }} ps -a --format '{{ '{{ .Names }}' }}'"
|
command: "{{ container_command }} ps -a --format '{{ '{{ .Names }}' }}'"
|
||||||
register: docker_containers
|
register: docker_containers
|
||||||
ignore_errors: true
|
failed_when: false
|
||||||
|
|
||||||
- name: Create container log dir
|
- name: Create container log dir
|
||||||
file:
|
file:
|
||||||
@ -17,7 +17,7 @@
|
|||||||
shell: "{{ container_command }} logs {{ zj_container_name }} &> {{ ansible_user_dir }}/zuul-output/logs/{{ container_command }}/{{ zj_container_name }}.txt"
|
shell: "{{ container_command }} logs {{ zj_container_name }} &> {{ ansible_user_dir }}/zuul-output/logs/{{ container_command }}/{{ zj_container_name }}.txt"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
ignore_errors: true
|
failed_when: false
|
||||||
|
|
||||||
- name: Open container logs permissions
|
- name: Open container logs permissions
|
||||||
file:
|
file:
|
||||||
|
Loading…
Reference in New Issue
Block a user