system-config/roles-test/post.yaml
Ian Wienand 039aae5fa7
openafs: copy dkms log directory
Grab the make logs from the dkms directory.  This is helpful if the
modules are failing to build.

The /var/lib/dkms directory contains all the source and object files,
etc., which seems unnecessary to store in general.  Thus we just trim
this to the log directory.

Change-Id: I9b5abc9cf4cd59305470a04dda487dfdfd1b395a
2022-11-21 10:33:11 +11:00

22 lines
623 B
YAML

- hosts: localhost
tasks:
- name: Make log directories for testing hosts
file:
path: "{{ zuul.executor.log_root }}/{{ item }}/logs"
state: directory
recurse: true
loop: "{{ query('inventory_hostnames', 'all') }}"
- hosts: all
tasks:
- name: Get dkms make logs
shell: |
DKMS_MAKE_LOGS=/var/lib/dkms-make-logs
mkdir ${DKMS_MAKE_LOGS}
find /var/lib/dkms/ -type d -wholename "*/log" -exec cp -r --parents \{\} ${DKMS_MAKE_LOGS} \;
chown zuul:zuul ${DKMS_MAKE_LOGS}
become: yes
- include_role:
name: stage-output