58 lines
2.1 KiB
YAML
58 lines
2.1 KiB
YAML
---
|
|
- name: Build report
|
|
include: build-report.yaml
|
|
when: not use_kolla | default(false)
|
|
|
|
- name: Grab job artifacts
|
|
become: true
|
|
args:
|
|
chdir: "{{ workspace }}"
|
|
shell: |
|
|
set -x
|
|
mkdir -p {{ workspace }}/conf/
|
|
mkdir -p {{ workspace }}/logs/system
|
|
mkdir -p {{ workspace }}/logs/httpd_data
|
|
mkdir -p {{ workspace }}/etc/ansible
|
|
mkdir -p {{ workspace }}/etc/docker
|
|
mkdir -p {{ workspace }}/etc/httpd
|
|
|
|
mv *.conf {{ workspace }}/conf/
|
|
mv {{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common/container-images/*_containers.yaml {{ workspace }}/conf/
|
|
mv *.log {{ workspace }}/logs/
|
|
mv *.html {{ workspace }}/logs/
|
|
mv *.sh {{ workspace }}/logs/
|
|
mv /tmp/kolla-* {{ workspace }}/logs/ || true
|
|
rsync -var --no-links /var/log/ {{ workspace }}/logs/system/ || true
|
|
rsync -var --no-links /etc/ansible/ {{ workspace }}/etc/ansible/ || true
|
|
rsync -var --no-links /etc/docker/ {{ workspace }}/etc/docker/ || true
|
|
rsync -var --no-links /etc/httpd/ {{ workspace }}/etc/httpd/ || true
|
|
rsync -var --no-links /var/www/html/ {{ workspace }}/logs/httpd_data/ || true
|
|
rsync -var --no-links /etc/containers/ {{ workspace }}/etc/containers/ || true
|
|
rsync -var --no-links --include 'yum.repos.d/***' --include 'yum.conf' --include 'dnf/***' --exclude='*' /etc/ {{ workspace }}/etc/ || true
|
|
|
|
# Collect installed packages
|
|
{{ ansible_pkg_mgr }} list installed &>{{ workspace }}/logs/system/installed_pkgs.txt
|
|
|
|
# Save some statistics
|
|
df -h &>{{ workspace }}/logs/system/disk_usage.txt
|
|
|
|
chmod -R a+r "{{ workspace }}"
|
|
chown -R {{ ansible_user }}: "{{ workspace }}"
|
|
changed_when: true
|
|
|
|
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
no_log: true
|
|
synchronize:
|
|
src: '{{ ansible_user_dir }}/workspace/'
|
|
dest: '{{ zuul.executor.log_root }}'
|
|
mode: pull
|
|
copy_links: true
|
|
verify_host: true
|
|
rsync_opts:
|
|
- --include=/etc/**
|
|
- --include=/conf/**
|
|
- --include=/logs/**
|
|
- --include=*/
|
|
- --exclude=*
|
|
- --prune-empty-dirs
|