
The executor variable is work_root, not work_dir. Change-Id: Ie09989cccb2574d5d474118a8f534f66fc47b4a6
40 lines
982 B
YAML
40 lines
982 B
YAML
- name: Set log path for multiple nodes
|
|
set_fact:
|
|
log_path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
|
|
when: groups['all'] | length > 1
|
|
|
|
- name: Set log path for single node
|
|
set_fact:
|
|
log_path: "{{ zuul.executor.log_root }}"
|
|
when: log_path is not defined
|
|
|
|
- name: Ensure local output dirs
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ log_path }}"
|
|
- "{{ zuul.executor.work_root }}/artifacts"
|
|
- "{{ zuul.executor.work_root }}/docs"
|
|
|
|
- name: Collect log output
|
|
synchronize:
|
|
dest: "{{ log_path }}/"
|
|
mode: pull
|
|
src: "{{ zuul_output_dir }}/logs/"
|
|
verify_host: true
|
|
|
|
- name: Collect artifacts
|
|
synchronize:
|
|
dest: "{{ zuul.executor.work_root }}/artifacts/"
|
|
mode: pull
|
|
src: "{{ zuul_output_dir }}/artifacts/"
|
|
verify_host: true
|
|
|
|
- name: Collect docs
|
|
synchronize:
|
|
dest: "{{ zuul.executor.work_root }}/docs/"
|
|
mode: pull
|
|
src: "{{ zuul_output_dir }}/docs/"
|
|
verify_host: true
|