39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
---
|
|
|
|
- hosts: all
|
|
tasks:
|
|
- name: Clean up the vault key
|
|
command: "shred -u {{ vault_key_path }}"
|
|
args:
|
|
removes: "{{ vault_key_path }}"
|
|
- name: Run the log collection script
|
|
shell: |
|
|
source scripts/scripts-library.sh
|
|
gate_job_exit_tasks
|
|
become: yes
|
|
become_user: root
|
|
args:
|
|
chdir: "{{ lsn_ci_src_path }}/openstack-ansible"
|
|
executable: /bin/bash
|
|
environment:
|
|
GATE_EXIT_LOG_COPY: 'true'
|
|
GATE_LOG_DIR: "{{ lsn_ci_src_path }}/logs"
|
|
- name: Check whether a logs folder exists
|
|
stat:
|
|
path: "{{ lsn_ci_src_path }}/logs"
|
|
get_attributes: no
|
|
get_checksum: no
|
|
get_md5: no
|
|
get_mime: no
|
|
register: logs_folder
|
|
- name: Copy logs back to the executor
|
|
synchronize:
|
|
src: "{{ lsn_ci_src_path }}/logs"
|
|
dest: "{{ zuul.executor.log_root }}/"
|
|
mode: pull
|
|
rsync_opts:
|
|
- "--quiet"
|
|
when:
|
|
- logs_folder.stat is defined
|
|
- logs_folder.stat.exists | bool
|