Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 1 | --- |
| 2 | # compute-diag/tasks/main.yml |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 3 | |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 4 | - name: Create diag_dir subdir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 5 | file: |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 6 | dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}" |
| 7 | state: directory |
| 8 | register: compute_diag_dir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 9 | |
| 10 | - name: Compute node diag collection |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 11 | shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 12 | args: |
| 13 | creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 14 | with_items: |
Zack Williams | dc4878f | 2016-07-26 14:50:30 -0700 | [diff] [blame] | 15 | - "date" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 16 | - "arp -n" |
| 17 | - "brctl show" |
| 18 | - "cat /etc/resolv.conf" |
Zack Williams | dc4878f | 2016-07-26 14:50:30 -0700 | [diff] [blame] | 19 | - "cat /etc/lsb-release" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 20 | - "ifconfig -a" |
| 21 | - "route -n" |
Zack Williams | ae17c50 | 2016-06-28 22:05:19 -0700 | [diff] [blame] | 22 | - "sudo ovs-vsctl show" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 23 | |