Clark Boylan 60acea0da6 Run latest ansible-lint on Ubuntu Noble
We bump the Ansible version to the version that Zuul runs. We then set
ansible-lint to the current latest version. This results in a number of
new linter violations which we fix. These violations include:

 * Needing to name plays
 * Needing to start names with a capital letter
 * Using fully qualified names for action modules
 * Quoting permissions strings to avoid octal conversion errors
 * Using explicit yaml structures for tasks

We also tell ansible-lint to mock zuul_return so that we don't get
errors from it complaining that this module is not defined.

Change-Id: Ic881313fea58f4482f70e493f3d256541d31860a
2024-10-07 12:36:32 -07:00

27 lines
691 B
YAML

- name: Collect Wheel Cache Build Logs
hosts: all
tasks:
- name: Ensure build logs directory exists
file:
path: "{{ zuul.executor.log_root }}/{{ wheel_python }}"
state: directory
delegate_to: localhost
- name: Compress build logs
community.general.archive:
dest: '~/logs/build-logs.tar.bz2'
path: '~/logs/build'
format: bz2
- name: Remove uncompressed logs
file:
state: absent
path: '~/logs/build'
- name: Collect final logs
ansible.posix.synchronize:
dest: "{{ zuul.executor.log_root }}/{{ wheel_python }}"
mode: pull
src: ~/logs/
verify_host: true