blob: dd6721a68e031c14059bed4094eb25adc1458127 [file] [log] [blame]
Zack Williams2bfbbd62016-06-13 10:18:19 -07001---
2# Collects diagnostic information for the currently running cord-pod config
3
Zack Williamsba7af9e2016-06-27 17:21:09 -07004- name: Create diag_dir fact
Zack Williams04106732016-06-27 20:55:32 -07005 hosts: head
6 tasks:
Zack Williams35624562016-08-28 17:12:26 -07007 - name: Set diag_dir name to diag-rfc3339_datetime
8 set_fact:
Zack Williams04106732016-06-27 20:55:32 -07009 diag_dir: "diag-{{ ansible_date_time.iso8601_basic_short }}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070010
Zack Williams2bfbbd62016-06-13 10:18:19 -070011- name: Diagnostics on head node
12 hosts: head
13 roles:
14 - head-diag
Zack Williamsba7af9e2016-06-27 17:21:09 -070015
16- name: Diagnostics on compute nodes
17 hosts: compute
18 roles:
19 - compute-diag
20
21- name: Collect compute node diagnostics on head node
22 hosts: compute
Zack Williams04106732016-06-27 20:55:32 -070023 tasks:
Zack Williams35624562016-08-28 17:12:26 -070024 - name: rsync diag_dir from compute nodes
25 synchronize:
Zack Williams04106732016-06-27 20:55:32 -070026 src: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
27 dest: "~/{{ hostvars[groups['head'][0]]['diag_dir'] }}/"
28 recursive: yes
29 mode: pull
30 delegate_to: "{{ groups['head'][0] }}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070031