279 lines
9.8 KiB
YAML
279 lines
9.8 KiB
YAML
---
|
|
- hosts: all,!bastion
|
|
tasks:
|
|
- name: Ensure journald logs directory exists
|
|
file:
|
|
path: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal"
|
|
state: directory
|
|
|
|
- hosts: statsd01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- statsd
|
|
|
|
- name: Collect statsd log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/statsd
|
|
- /var/log/statsd
|
|
|
|
- hosts: gear01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- gear
|
|
|
|
- name: Collect gear log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/gear/logging.conf
|
|
- /var/log/gear
|
|
|
|
- hosts: nb01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- nodepool-builder
|
|
|
|
- name: Collect nodepool-builder log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/nodepool/builder-logging.conf
|
|
- /etc/nodepool/nodepool.yaml
|
|
- /var/log/nodepool/builds
|
|
- /var/log/nodepool/builder-debug.log
|
|
- /var/log/nodepool/nodepool-builder.log
|
|
|
|
- hosts: nl01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- nodepool-launcher
|
|
|
|
- name: Collect nodepool-launcher log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/nodepool/launcher-logging.conf
|
|
- /etc/nodepool/nodepool.yaml
|
|
- /var/log/nodepool/launcher-debug.log
|
|
- /var/log/nodepool/nodepool-launcher.log
|
|
|
|
- hosts: zs01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- zuul-scheduler
|
|
|
|
- name: Collect zuul-scheduler log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zuul/main.yaml
|
|
- /etc/zuul/scheduler-logging.conf
|
|
- /etc/zuul/zuul.conf
|
|
- /var/log/zuul/scheduler-debug.log
|
|
- /var/log/zuul/scheduler.log
|
|
|
|
- hosts: ze01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- zuul-executor
|
|
|
|
- name: Collect zuul-executor log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zuul/executor-logging.conf
|
|
- /etc/zuul/zuul.conf
|
|
- /var/log/zuul/executor-debug.log
|
|
- /var/log/zuul/executor.log
|
|
|
|
- hosts: zf01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- zuul-fingergw
|
|
|
|
- name: Collect zuul-fingergw log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zuul/fingergw-logging.conf
|
|
- /etc/zuul/zuul.conf
|
|
- /var/log/zuul/fingergw-debug.log
|
|
- /var/log/zuul/fingergw.log
|
|
|
|
- hosts: zm01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- zuul-merger
|
|
|
|
- name: Collect zuul-merger log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zuul/merger-logging.conf
|
|
- /etc/zuul/zuul.conf
|
|
- /var/log/zuul/merger-debug.log
|
|
- /var/log/zuul/merger.log
|
|
|
|
- hosts: zr01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- zuul-registry
|
|
|
|
- name: Collect zuul-registry log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zuul-registry
|
|
|
|
- hosts: zw01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- nginx
|
|
- zuul-web
|
|
|
|
- name: Collect zuul-web log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zuul/web-logging.conf
|
|
- /etc/zuul/zuul.conf
|
|
- /var/log/nginx/access.log
|
|
- /var/log/nginx/error.log
|
|
- /var/log/zuul/web-debug.log
|
|
- /var/log/zuul/web.log
|
|
|
|
- hosts: zk01
|
|
tasks:
|
|
- name: Collect journald logs
|
|
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
args:
|
|
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
|
|
with_items:
|
|
- zookeeper
|
|
|
|
- name: Collect zookeeper log files
|
|
become: true
|
|
synchronize:
|
|
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
|
|
rsync_opts:
|
|
- "--relative"
|
|
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
|
|
src: "{{ item }}"
|
|
verify_host: true
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
with_items:
|
|
- /etc/zookeeper
|
|
- /var/log/zookeeper
|