Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 17 | --- |
| 18 | # compute-diag/tasks/main.yml |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 19 | |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 20 | - name: Create diag_dir subdir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 21 | file: |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 22 | dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}" |
| 23 | state: directory |
| 24 | register: compute_diag_dir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 25 | |
| 26 | - name: Compute node diag collection |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 27 | shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | 97bbf0b | 2017-08-01 22:50:08 -0700 | [diff] [blame] | 28 | ignore_errors: yes |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 29 | args: |
| 30 | creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 31 | with_items: |
Zack Williams | dc4878f | 2016-07-26 14:50:30 -0700 | [diff] [blame] | 32 | - "date" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 33 | - "arp -n" |
| 34 | - "brctl show" |
| 35 | - "cat /etc/resolv.conf" |
Zack Williams | dc4878f | 2016-07-26 14:50:30 -0700 | [diff] [blame] | 36 | - "cat /etc/lsb-release" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 37 | - "ifconfig -a" |
| 38 | - "route -n" |
Zack Williams | ae17c50 | 2016-06-28 22:05:19 -0700 | [diff] [blame] | 39 | - "sudo ovs-vsctl show" |
Zack Williams | 97bbf0b | 2017-08-01 22:50:08 -0700 | [diff] [blame] | 40 | - "sudo ovs-vsctl get-controller br-int" |
| 41 | |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 42 | |