Add support for zuul-fingergw

Change-Id: Ifdff6b4130ecc6c1623d7596d158b58d04592536
Depends-On: https://review.openstack.org/550547
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger
2018-03-08 08:28:14 -05:00
parent 0b12254922
commit 59eeb51a12
12 changed files with 198 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
- "{{ zuul.executor.log_root }}/logs/nb01/var/log"
- "{{ zuul.executor.log_root }}/logs/nl01/var/log"
- "{{ zuul.executor.log_root }}/logs/ze01/var/log"
- "{{ zuul.executor.log_root }}/logs/zf01/var/log"
- "{{ zuul.executor.log_root }}/logs/zm01/var/log"
- "{{ zuul.executor.log_root }}/logs/zs01/var/log"
- "{{ zuul.executor.log_root }}/logs/zw01/var/log"
@@ -158,6 +159,43 @@
- /var/log/zuul/executor-debug.log
- /var/log/zuul/executor.log
- hosts: zf01
tasks:
- name: Ensure journald logs directory exists
file:
path: "~/logs/{{ inventory_hostname }}/journal"
state: directory
- name: Collect journald logs
become: yes
shell: "journalctl -u {{ item }}.service > /home/{{ ansible_user }}/logs/{{ inventory_hostname }}/journal/{{ item }}.service.log"
args:
creates: "/home/{{ ansible_user }}/logs/{{ inventory_hostname }}/journal/{{ item }}.service.log"
with_items:
- zuul-fingergw
- name: Collect journald log files
synchronize:
dest: "{{ zuul.executor.log_root }}/logs/{{ inventory_hostname }}/var/log"
mode: pull
src: "~/logs/{{ inventory_hostname }}/journal"
verify_host: true
- name: Collect zf01 log files
synchronize:
dest: "{{ zuul.executor.log_root }}/logs/{{ inventory_hostname}}"
mode: pull
rsync_opts:
- "--relative"
src: "{{ item }}"
verify_host: true
with_items:
- /etc/zuul/fingergw-logging.conf
- /etc/zuul/config
- /etc/zuul/zuul.conf
- /var/log/zuul/fingergw-debug.log
- /var/log/zuul/fingergw.log
- hosts: zm01
tasks:
- name: Ensure journald logs directory exists