Also collect journald logs

Change-Id: I7a952f835d7f43e1e96e8024d17fa6756fe0cc48
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-08-14 21:53:16 -04:00
parent 81b000901c
commit 2d9363cba7
1 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,18 @@
- hosts: all
tasks:
- name: Ensure journald logs directory exists
file:
path: "{{ zuul_output_dir }}/logs/logs/var/log/journal"
state: directory
- name: Collect journald logs
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/var/log/journal/{{ item }}.service.log"
args:
creates: "{{ zuul_output_dir }}/logs/logs/var/log/journal/{{ item }}.service.log"
with_items:
- nodepool-builder
- nodepool-launcher
- name: Prepare nodepool log files
become: yes
synchronize: