blob: 1bbf7550d06e27c837d225316324e569900a43e6 [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 Williams35624562016-08-28 17:12:26 -070012 args:
13 creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070014 with_items:
Zack Williamsdc4878f2016-07-26 14:50:30 -070015 - "date"
Zack Williamsba7af9e2016-06-27 17:21:09 -070016 - "arp -n"
17 - "brctl show"
18 - "cat /etc/resolv.conf"
Zack Williamsdc4878f2016-07-26 14:50:30 -070019 - "cat /etc/lsb-release"
Zack Williamsba7af9e2016-06-27 17:21:09 -070020 - "ifconfig -a"
21 - "route -n"
Zack Williamsae17c502016-06-28 22:05:19 -070022 - "sudo ovs-vsctl show"
Zack Williamsba7af9e2016-06-27 17:21:09 -070023