2017-10-02 10:05:17 -05:00
|
|
|
- hosts: all
|
2017-10-25 16:05:46 -05:00
|
|
|
become: True
|
|
|
|
vars:
|
2017-12-11 14:30:59 +00:00
|
|
|
devstack_log_dir: "{{ devstack_base_dir|default('/opt/stack') }}/logs/"
|
2017-10-25 16:05:46 -05:00
|
|
|
devstack_conf_dir: "{{ devstack_base_dir|default('/opt/stack') }}/devstack/"
|
2017-12-14 16:08:51 +00:00
|
|
|
devstack_full_log: "{{ devstack_early_log|default('/opt/stack/logs/devstack-early.txt') }}"
|
2017-12-14 20:35:38 +00:00
|
|
|
tasks:
|
|
|
|
# NOTE(andreaf) If the tempest service is enabled, a tempest.log is
|
|
|
|
# generated as part of lib/tempest, as a result of verify_tempest_config
|
|
|
|
- name: Check if a tempest log exits
|
|
|
|
stat:
|
|
|
|
path: "{{ devstack_conf_dir }}/tempest.log"
|
|
|
|
register: tempest_log
|
|
|
|
- name: Link post-devstack tempest.log
|
|
|
|
file:
|
|
|
|
src: "{{ devstack_conf_dir }}/tempest.log"
|
|
|
|
dest: "{{ stage_dir }}/verify_tempest_conf.log"
|
|
|
|
state: hard
|
|
|
|
when: tempest_log.stat.exists
|
2017-10-02 10:05:17 -05:00
|
|
|
roles:
|
|
|
|
- export-devstack-journal
|
2017-12-08 17:41:40 +00:00
|
|
|
- apache-logs-conf
|
2017-12-15 13:55:50 +00:00
|
|
|
- devstack-project-conf
|
2017-12-15 17:35:31 +00:00
|
|
|
# capture-system-logs should be the last role before stage-output
|
|
|
|
- capture-system-logs
|
2017-10-25 16:05:46 -05:00
|
|
|
- role: stage-output
|
2017-12-11 14:30:59 +00:00
|
|
|
# NOTE(andreaf) We need fetch-devstack-log-dir only as long as the base job
|
|
|
|
# starts pulling logs for us from {{ ansible_user_dir }}/logs.
|
|
|
|
# Meanwhile we already store things in ansible_user_dir and use
|
|
|
|
# fetch-devstack-log-dir setting devstack_base_dir
|
|
|
|
- role: fetch-devstack-log-dir
|
|
|
|
devstack_base_dir: "{{ ansible_user_dir }}"
|