blob: bd161927513383786df5bf548f5bf63d932c1b67 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
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 Williamsba7af9e2016-06-27 17:21:09 -070017---
18# compute-diag/tasks/main.yml
Zack Williams35624562016-08-28 17:12:26 -070019
Zack Williams04106732016-06-27 20:55:32 -070020- name: Create diag_dir subdir
Zack Williamsba7af9e2016-06-27 17:21:09 -070021 file:
Zack Williams35624562016-08-28 17:12:26 -070022 dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
23 state: directory
24 register: compute_diag_dir
Zack Williamsba7af9e2016-06-27 17:21:09 -070025
26- name: Compute node diag collection
Zack Williams04106732016-06-27 20:55:32 -070027 shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williams97bbf0b2017-08-01 22:50:08 -070028 ignore_errors: yes
Zack Williams35624562016-08-28 17:12:26 -070029 args:
30 creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070031 with_items:
Zack Williamsdc4878f2016-07-26 14:50:30 -070032 - "date"
Zack Williamsba7af9e2016-06-27 17:21:09 -070033 - "arp -n"
34 - "brctl show"
35 - "cat /etc/resolv.conf"
Zack Williamsdc4878f2016-07-26 14:50:30 -070036 - "cat /etc/lsb-release"
Zack Williamsba7af9e2016-06-27 17:21:09 -070037 - "ifconfig -a"
38 - "route -n"
Zack Williamsae17c502016-06-28 22:05:19 -070039 - "sudo ovs-vsctl show"
Zack Williams97bbf0b2017-08-01 22:50:08 -070040 - "sudo ovs-vsctl get-controller br-int"
41
Zack Williamsba7af9e2016-06-27 17:21:09 -070042