8b2e5653e4
Change-Id: I8ce7e11cd6027b53f1112c5880a5891c778db9d4
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
---
|
|
- name: Install stackviz
|
|
pip:
|
|
name: "{{ stackviz_tarball }}"
|
|
virtualenv: "{{ working_dir }}/tempest/.stackviz"
|
|
|
|
- name: Check if dstats file exists
|
|
stat: path=/var/log/extra/dstat-csv.log
|
|
register: dstat_result
|
|
|
|
- name: Set dstat fact
|
|
set_fact:
|
|
tempest_dstat_opt: '--dstat /var/log/extra/dstat-csv.log'
|
|
when: dstat_result.stat.exists
|
|
|
|
- name: Copy stackviz static file to home directory
|
|
shell: >
|
|
cp -r "{{ working_dir }}/tempest/.stackviz/share/stackviz-html" "{{ working_dir }}/stackviz"
|
|
changed_when: true
|
|
|
|
- name: Collecting data from tempest
|
|
shell: |
|
|
set -o pipefail
|
|
source "{{ working_dir }}/tempest/.stackviz/bin/activate"
|
|
stackviz-export {{ tempest_dstat_opt | default('') }} --env -f {{ working_dir }}/tempest/testrepository.subunit {{ working_dir }}/stackviz/data
|
|
register: stackviz_result
|
|
args:
|
|
chdir: "{{ working_dir }}/tempest"
|
|
changed_when: true
|
|
|
|
- name: Ensure /var/log/extra exists
|
|
file:
|
|
path: /var/log/extra
|
|
state: directory
|
|
mode: 0755
|
|
become: true
|
|
|
|
- name: Moving stackviz to /var/log/extra
|
|
shell: |
|
|
set -o pipefail
|
|
mv {{ working_dir }}/stackviz/ /var/log/extra
|
|
become: true
|
|
when: stackviz_result.rc == 0
|