more complete diagnostic playbook
diff --git a/roles/head-diag/tasks/main.yml b/roles/head-diag/tasks/main.yml
index 71723a2..f21ab89 100644
--- a/roles/head-diag/tasks/main.yml
+++ b/roles/head-diag/tasks/main.yml
@@ -3,7 +3,7 @@
- name: Create diag_dir subdirs
file:
- dest="{{ diag_dir }}/{{ item }}"
+ dest="~/{{ diag_dir }}/{{ item }}"
state=directory
with_items:
- net
@@ -13,7 +13,7 @@
- xos
- name: Networking diag collection
- shell: "{{ item }} > {{ diag_dir }}/net/{{ item | regex_replace('[^\\w-]', '_')}}"
+ shell: "{{ item }} > ~/{{ diag_dir }}/net/{{ item | regex_replace('[^\\w-]', '_')}}"
with_items:
- "ifconfig -a"
- "route -n"
@@ -23,13 +23,13 @@
- "sudo uvt-kvm list"
- name: Juju diag collection
- shell: "{{ item }} > {{ diag_dir }}/juju/{{ item | regex_replace('[^\\w-]', '_')}}"
+ shell: "{{ item }} > ~/{{ diag_dir }}/juju/{{ item | regex_replace('[^\\w-]', '_')}}"
with_items:
- "juju status --format=summary"
- "juju status --format=json"
- name: OpenStack diag collection
- shell: "source ~/admin-openrc.sh && {{ item }} > {{ diag_dir }}/openstack/{{ item | regex_replace('[^\\w-]', '_')}}"
+ shell: "source ~/admin-openrc.sh && {{ item }} > ~/{{ diag_dir }}/openstack/{{ item | regex_replace('[^\\w-]', '_')}}"
args:
executable: "/bin/bash"
with_items:
@@ -43,12 +43,12 @@
- "neutron port-list"
- name: ONOS diag collection - REST API
- shell: "curl -X GET -u karaf:karaf http://onos-cord-1:8181/onos/v1/{{ item }} | python -m json.tool > {{ diag_dir }}/onos/rest_{{ item | regex_replace('[^\\w-]', '_') }}"
+ shell: "curl -X GET -u karaf:karaf http://onos-cord-1:8181/onos/v1/{{ item }} | python -m json.tool > ~/{{ diag_dir }}/onos/rest_{{ item | regex_replace('[^\\w-]', '_') }}"
with_items:
- "hosts"
- name: ONOS diag collection - ONOS CLI
- shell: "sshpass -p 'karaf' ssh -p 8101 karaf@onos-cord {{ item }} > {{ diag_dir }}/onos/{{ item | regex_replace('[^\\w-]', '_') }}"
+ shell: "sshpass -p 'karaf' ssh -p 8101 karaf@onos-cord {{ item }} > ~/{{ diag_dir }}/onos/{{ item | regex_replace('[^\\w-]', '_') }}"
with_items:
- "cordvtn-nodes"
- "cordvtn-node-check nova-compute-1"
@@ -56,7 +56,7 @@
- "dhcp-list"
- name: XOS diag collection
- shell: "ssh ubuntu@xos-1 \"{{ item }}\" > {{ diag_dir }}/xos/{{ item | regex_replace('[^\\w-]', '_')}}"
+ shell: "ssh ubuntu@xos-1 \"{{ item }}\" > ~/{{ diag_dir }}/xos/{{ item | regex_replace('[^\\w-]', '_')}}"
with_items:
- "docker ps"
- "arp -n"
@@ -67,5 +67,5 @@
with_items:
- "scp {{ role_path }}/files/docker_logs.sh ubuntu@xos-1:~/docker_logs.sh"
- "ssh ubuntu@xos-1 'bash ~/docker_logs.sh'"
- - "rsync -avP ubuntu@xos-1:~/docker_logs/ {{ diag_dir }}/xos/"
+ - "rsync -avP ubuntu@xos-1:~/docker_logs/ ~/{{ diag_dir }}/xos/"