blob: 5d7e19d733fa1380537d42d67821b5d341dd7d48 [file] [log] [blame]
Zack Williamsba7af9e2016-06-27 17:21:09 -07001---
2# compute-diag/tasks/main.yml
Zack Williams35624562016-08-28 17:12:26 -07003
Zack Williams04106732016-06-27 20:55:32 -07004- name: Create diag_dir subdir
Zack Williamsba7af9e2016-06-27 17:21:09 -07005 file:
Zack Williams35624562016-08-28 17:12:26 -07006 dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
7 state: directory
8 register: compute_diag_dir
Zack Williamsba7af9e2016-06-27 17:21:09 -07009
10- name: Compute node diag collection
Zack Williams04106732016-06-27 20:55:32 -070011 shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williams97bbf0b2017-08-01 22:50:08 -070012 ignore_errors: yes
Zack Williams35624562016-08-28 17:12:26 -070013 args:
14 creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070015 with_items:
Zack Williamsdc4878f2016-07-26 14:50:30 -070016 - "date"
Zack Williamsba7af9e2016-06-27 17:21:09 -070017 - "arp -n"
18 - "brctl show"
19 - "cat /etc/resolv.conf"
Zack Williamsdc4878f2016-07-26 14:50:30 -070020 - "cat /etc/lsb-release"
Zack Williamsba7af9e2016-06-27 17:21:09 -070021 - "ifconfig -a"
22 - "route -n"
Zack Williamsae17c502016-06-28 22:05:19 -070023 - "sudo ovs-vsctl show"
Zack Williams97bbf0b2017-08-01 22:50:08 -070024 - "sudo ovs-vsctl get-controller br-int"
25
Zack Williamsba7af9e2016-06-27 17:21:09 -070026