Collect more logs

Change-Id: If2c2579c9e2d6145c82e2d56bae5c185e6e193de
This commit is contained in:
Sam Yaple 2017-10-17 00:31:12 -04:00
parent bee8e1ff2e
commit 5adaaf3447
3 changed files with 19 additions and 13 deletions

View File

@ -1,7 +1,7 @@
User zuul
Group zuul
ErrorLog /logs/error.log
TransferLog /logs/access.log
ErrorLog /logs/apache/error.log
TransferLog /logs/apache/access.log
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
LoadModule env_module /usr/lib/apache2/modules/mod_env.so

View File

@ -1,14 +1,19 @@
- hosts: all
tasks:
- name: Collect logs
block:
# NOTE(SamYaple): https://github.com/ansible/ansible/issues/14131
- command: cp -r /home/zuul/.ansible_async /logs/async_logs
- command: journalctl -xb -u docker.service
register: docker_daemon_log
no_log: True
- copy:
content: "{{ docker_daemon_log.stdout }}"
dest: /logs/docker_daemon.log
become: true
- name: Copy logs
synchronize:
src: '/logs'
dest: '{{ zuul.executor.log_root }}'
src: /logs
dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -60,15 +60,16 @@
jump: ACCEPT
become: True
- name: Setup http server for git and wheels
- name: Setup http server for git repos
block:
- file:
path: "{{ item.path }}"
owner: "{{ item.owner }}"
state: directory
with_items:
- path: /logs/
- path: /logs/apache/
owner: zuul
recurse: True
- path: /webroot/
owner: zuul
- path: /etc/systemd/system/apache2.service.d/