Monty Taylor 00e673c36b
Rename log_path and generate-log-url
Make log_path zuul_log_path because log_path is rather generic.

Rename generate-log-url to set-zuul-log-path-fact to make it
clearer what it does.

Change-Id: I91ae1e396b3ef04939edebaeea8e5b16cc50315a
2017-09-09 16:49:51 -06:00

38 lines
954 B
YAML

- include_role:
name: set-zuul-log-path-fact
- name: Create log directories
file:
path: "{{zuul_logserver_root}}/{{ zuul_log_path }}"
state: directory
recurse: yes
mode: 0775
- name: Upload logs to log server
synchronize:
src: "{{ zuul.executor.log_root }}/"
dest: "{{zuul_logserver_root}}/{{ zuul_log_path }}/"
rsync_opts:
- "--exclude=job-output.txt"
no_log: true
# After this point there are no more logs
- name: gzip console log
delegate_to: localhost
archive:
path: "{{ zuul.executor.log_root }}/job-output.txt"
- name: Upload console log
synchronize:
src: "{{ zuul.executor.log_root }}/job-output.txt.gz"
dest: "{{zuul_logserver_root}}/{{ zuul_log_path }}/job-output.txt.gz"
verify_host: true
- name: Return log URL to Zuul
delegate_to: localhost
zuul_return:
data:
zuul:
log_url: "{{ zuul_log_url }}/{{ zuul_log_path }}/"
when: zuul_log_url is defined