kayobe/roles/kayobe-diagnostics/tasks/post.yml
Mark Goddard d594faf657 Collect kayobe and kolla configuration in deployment CI jobs
This can help in analysing failures.

Change-Id: I9910f89fbeb5698a66659a835041dc564e2b64ae
2018-05-16 19:15:05 +01:00

25 lines
655 B
YAML

---
- name: Write host variables to a file
copy:
content: "{{ hostvars[inventory_hostname] | to_nice_json }}"
dest: "{{ kayobe_diagnostics_log_dir }}/facts.json"
- name: Run diagnostics script
script: get_logs.sh
register: get_logs_result
become: true
failed_when: false
environment:
LOG_DIR: "{{ kayobe_diagnostics_log_dir }}"
CONFIG_DIR: "{{ kayobe_diagnostics_config_dir }}"
- name: Print get_logs.sh output
debug:
msg: "{{ get_logs_result.stdout }}"
- name: Download logs to executor
synchronize:
src: "{{ kayobe_diagnostics_log_dir }}/"
dest: "{{ kayobe_diagnostics_executor_log_dir }}/"
mode: pull