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 User zuul
Group zuul Group zuul
ErrorLog /logs/error.log ErrorLog /logs/apache/error.log
TransferLog /logs/access.log TransferLog /logs/apache/access.log
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
LoadModule env_module /usr/lib/apache2/modules/mod_env.so LoadModule env_module /usr/lib/apache2/modules/mod_env.so

View File

@ -1,14 +1,19 @@
- hosts: all - hosts: all
tasks: 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 - name: Copy logs
synchronize: synchronize:
src: '/logs' src: /logs
dest: '{{ zuul.executor.log_root }}' dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
mode: pull 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 jump: ACCEPT
become: True become: True
- name: Setup http server for git and wheels - name: Setup http server for git repos
block: block:
- file: - file:
path: "{{ item.path }}" path: "{{ item.path }}"
owner: "{{ item.owner }}" owner: "{{ item.owner }}"
state: directory state: directory
with_items: with_items:
- path: /logs/ - path: /logs/apache/
owner: zuul owner: zuul
recurse: True
- path: /webroot/ - path: /webroot/
owner: zuul owner: zuul
- path: /etc/systemd/system/apache2.service.d/ - path: /etc/systemd/system/apache2.service.d/