def7d35404
More info please check[0][1]. [0] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128902.html [1] https://ara.readthedocs.io/en/latest/advanced.html Change-Id: I5cf68c0bb54878e328387143712dec9582be04a1
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
---
|
|
- hosts: all
|
|
vars:
|
|
logs_dir: "/tmp/logs"
|
|
tasks:
|
|
- name: Print all facts
|
|
copy:
|
|
content: "{{ hostvars[inventory_hostname] | to_nice_json }}"
|
|
dest: "{{ logs_dir }}/facts.json"
|
|
|
|
- name: Run diagnostics script
|
|
script: get_logs.sh
|
|
register: get_logs_result
|
|
become: true
|
|
failed_when: false
|
|
|
|
- name: Print get_logs output
|
|
debug:
|
|
msg: "{{ get_logs_result.stdout }}"
|
|
|
|
- name: Download /etc/hosts file to executor
|
|
synchronize:
|
|
src: "/etc/hosts"
|
|
dest: "{{ zuul.executor.log_root }}/{{inventory_hostname }}/"
|
|
mode: pull
|
|
ignore_errors: yes
|
|
|
|
- name: dump all iptables rules
|
|
shell: "iptables-save > /tmp/logs/iptables"
|
|
become: true
|
|
|
|
- name: Download /tmp/logs file to executor
|
|
synchronize:
|
|
src: "/tmp/logs"
|
|
dest: "{{ zuul.executor.log_root }}/{{inventory_hostname }}/"
|
|
mode: pull
|
|
|
|
- hosts: primary
|
|
tasks:
|
|
- name: ensure ara-report folder existence
|
|
file:
|
|
path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/ara-report"
|
|
state: directory
|
|
delegate_to: localhost
|
|
run_once: true
|
|
|
|
- name: download ara sqlite
|
|
synchronize:
|
|
src: "{{ ansible_env.HOME }}/.ara/ansible.sqlite"
|
|
dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/ara-report/"
|
|
mode: pull
|