diff --git a/playbooks/nodepool-functional-container-openstack/post.yaml b/playbooks/nodepool-functional-container-openstack/post.yaml index 8d972efaf..441449d07 100644 --- a/playbooks/nodepool-functional-container-openstack/post.yaml +++ b/playbooks/nodepool-functional-container-openstack/post.yaml @@ -1,4 +1,6 @@ - hosts: all + roles: + - collect-container-logs tasks: - name: Copy nodepool log files synchronize: @@ -40,25 +42,9 @@ dest: '{{ zuul.executor.log_root }}' mode: pull - - 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 }}/docker" - state: directory - - - name: Save container logs - loop: "{{ docker_containers.stdout_lines | default([]) }}" - shell: "docker logs {{ item }} &> {{ ansible_user_dir }}/docker/{{ item }}.txt" - args: - executable: /bin/bash - - name: Copy docker logs become: True synchronize: - src: '{{ ansible_user_dir }}/docker' + src: '{{ ansible_user_dir }}/zuul-output/logs/docker' dest: '{{ zuul.executor.log_root }}' - mode: pull \ No newline at end of file + mode: pull