python-tempestconf/playbooks/upload-logs.yaml
Arx Cruz 6f471b6dd5 Switch ansible module command with copy
We thought there were a bug in copy command due the fact it wasn't
copying the files to logs. Turns out it was the remote_src option that
was missed.

Change-Id: I1712959f68276162a6e8b6f0a10c80ff3ed94367
2018-07-04 07:21:15 -03:00

33 lines
825 B
YAML

- hosts: all
tasks:
- name: Create tempest directory in /tmp/logs
file:
path: /tmp/logs/tempest
state: directory
become: true
- name: Copying tempest logs and config to /tmp/logs/tempest
copy:
src: "{{ item }}"
dest: /tmp/logs/tempest
remote_src: true
with_items:
- /opt/stack/tempest/etc/tempest.conf
- /opt/stack/tempest/tempest.log
- /etc/openstack/accounts.yaml
ignore_errors: true
become: true
- name: Upload logs
synchronize:
src: '/tmp/logs'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs