blob: 5d7e19d733fa1380537d42d67821b5d341dd7d48 [file] [log] [blame]
---
# compute-diag/tasks/main.yml
- name: Create diag_dir subdir
file:
dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
state: directory
register: compute_diag_dir
- name: Compute node diag collection
shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}"
ignore_errors: yes
args:
creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}"
with_items:
- "date"
- "arp -n"
- "brctl show"
- "cat /etc/resolv.conf"
- "cat /etc/lsb-release"
- "ifconfig -a"
- "route -n"
- "sudo ovs-vsctl show"
- "sudo ovs-vsctl get-controller br-int"