blob: 28ba3b31753cdceed43436ed2744c15783d8a952 [file] [log] [blame]
SF initial configuratora26c41e2022-10-06 13:33:13 +03001- name: Set log path for multiple nodes
2 set_fact:
3 log_path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
4 when: groups['all'] | length > 1
5
6- name: Set log path for single node
7 set_fact:
8 log_path: "{{ zuul.executor.log_root }}"
9 when: log_path is not defined
10
11- name: Ensure local output dirs
12 delegate_to: localhost
13 file:
14 path: "{{ item }}"
15 state: directory
16 with_items:
17 - "{{ log_path }}"
18 - "{{ log_path }}/npm"
19 - "{{ zuul.executor.work_root }}/artifacts"
20 - "{{ zuul.executor.work_root }}/docs"
21
22- include_tasks: rsync.yaml
23 when: item.1.pod is defined
24 loop: "{{ openshift_pods.items()|list }}"
25 run_once: true
26
27- name: Remove empty directory
28 command: find "{{ zuul.executor.work_root }}" -empty -type d -delete
29 delegate_to: localhost