b2ae863f50
Latest ansible-lint is finding this. It seems reasonable enough to ensure the task is named; it's always nice to have context about what is happening as you read the file. Change-Id: Ia7e490aaba99da9694a6f3fdb1bca9838221b30a
36 lines
933 B
YAML
36 lines
933 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
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zj_output_dir }}"
|
|
state: directory
|
|
mode: 0755
|
|
with_items:
|
|
- "{{ log_path }}"
|
|
- "{{ log_path }}/npm"
|
|
- "{{ zuul.executor.work_root }}/artifacts"
|
|
- "{{ zuul.executor.work_root }}/docs"
|
|
loop_control:
|
|
loop_var: zj_output_dir
|
|
|
|
- name: Include rsync tasks
|
|
include_tasks: rsync.yaml
|
|
when: zj_pod.1.pod is defined
|
|
loop: "{{ openshift_pods.items()|list }}"
|
|
loop_control:
|
|
loop_var: zj_pod
|
|
run_once: true
|
|
|
|
- name: Remove empty directory
|
|
command: find "{{ zuul.executor.work_root }}" -empty -type d -delete
|
|
delegate_to: localhost
|