Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 1 | --- |
| 2 | # compute-diag/tasks/main.yml |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 3 | # |
| 4 | - name: Create diag_dir subdir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 5 | file: |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 6 | dest="/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}" |
| 7 | state=directory |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 8 | |
| 9 | - name: Compute node diag collection |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 10 | shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 11 | with_items: |
| 12 | - "arp -n" |
| 13 | - "brctl show" |
| 14 | - "cat /etc/resolv.conf" |
| 15 | - "ifconfig -a" |
| 16 | - "route -n" |
| 17 | |