From cf69b2ecfa9bf807168a1c96035ba162618119d1 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Thu, 9 Jan 2020 19:39:15 -0500 Subject: [PATCH] Switch to collect-container-logs This change switches the post bits to use a new centralized role to collect all container logs. Depends-On: https://review.opendev.org/701867 Change-Id: I74209fe9b2294709bbef37560d93d63a86c36a10 --- playbooks/functional-test/post.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/playbooks/functional-test/post.yaml b/playbooks/functional-test/post.yaml index 977ecea..5242b7b 100644 --- a/playbooks/functional-test/post.yaml +++ b/playbooks/functional-test/post.yaml @@ -1,17 +1,3 @@ - hosts: all - tasks: - - name: List containers - command: "docker ps -a --format '{{ '{{ .Names }}' }}'" - register: docker_containers - ignore_errors: true - - - name: Create container log dir - file: - path: "{{ ansible_user_dir }}/zuul-output/logs/docker" - state: directory - - - name: Save container logs - loop: "{{ docker_containers.stdout_lines | default([]) }}" - shell: "docker logs {{ item }} &> {{ ansible_user_dir }}/zuul-output/logs/docker/{{ item }}.txt" - args: - executable: /bin/bash + roles: + - collect-container-logs