--- - name: Check for .stestr directory stat: path: "{{ working_dir }}/tempest/.stestr" register: testr_dir - name: Define testr facts set_fact: testr_command: testr testr_dir: .testrepository when: not testr_dir.stat.exists - name: Define stestr facts set_fact: testr_command: stestr testr_dir: .stestr when: testr_dir.stat.exists - name: Cloning stackviz from openstack git: repo: git://git.openstack.org/openstack/stackviz dest: "{{ working_dir }}/stackviz" version: master - name: Copying stackviz static files synchronize: src: stackviz/ dest: "{{ working_dir }}/stackviz_static" use_ssh_args: true - name: Install pip easy_install: name: pip state: present become: true - name: Install stackviz pip: name: "." chdir: "{{ working_dir }}/stackviz" become: true - 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: Collecting data from tempest shell: > {% if tempest_format == 'venv' %}source {{ working_dir }}/tempest_git/.venv/bin/activate; {% endif %} {{ testr_command }} last --subunit | subunit-1to2 | stackviz-export {{ tempest_dstat_opt | default('') }} --env --stdin {{ working_dir }}/stackviz_static/data args: chdir: "{{ working_dir }}/tempest" - name: Moving stackviz to /var/log/extra shell: mv {{ working_dir }}/stackviz_static/ /var/log/extra/stackviz become: true