windmill/tests/playbooks/post.yaml

25 lines
739 B
YAML

- hosts: all
tasks:
- name: Collect logs from hosts
block:
- name: Run ansible-playbook for collect-logs.yaml
args:
chdir: "{{ windmill_src_dir }}"
shell: tox -evenv -- ansible-playbook -i inventory/testing/hosts tests/collect-logs.yaml
always:
- name: Ensure ara-report directory exists
file:
path: ~/logs/ara-report
state: directory
- name: Copy ARA database to ara-report directory
shell: cp ~/.ara/ansible.sqlite ~/logs/ara-report
- name: Collect log files
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
src: ~/logs
verify_host: true