blob: d6290b9dfa87b38399504ade0718d76f4fe7e469 [file] [log] [blame]
Zack Williamsba7af9e2016-06-27 17:21:09 -07001---
2# compute-diag/tasks/main.yml
Zack Williams04106732016-06-27 20:55:32 -07003#
4- name: Create diag_dir subdir
Zack Williamsba7af9e2016-06-27 17:21:09 -07005 file:
Zack Williams04106732016-06-27 20:55:32 -07006 dest="/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
7 state=directory
Zack Williamsba7af9e2016-06-27 17:21:09 -07008
9- name: Compute node diag collection
Zack Williams04106732016-06-27 20:55:32 -070010 shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070011 with_items:
12 - "arp -n"
13 - "brctl show"
14 - "cat /etc/resolv.conf"
15 - "ifconfig -a"
16 - "route -n"
17