blob: ea06cdaec5b55b3b18b21e11174c179715d21b40 [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:
7 - set_fact:
8 diag_dir: "diag-{{ ansible_date_time.iso8601_basic_short }}"
Zack Williamsba7af9e2016-06-27 17:21:09 -07009
Zack Williams2bfbbd62016-06-13 10:18:19 -070010- name: Diagnostics on head node
11 hosts: head
12 roles:
13 - head-diag
Zack Williamsba7af9e2016-06-27 17:21:09 -070014
15- name: Diagnostics on compute nodes
16 hosts: compute
17 roles:
18 - compute-diag
19
20- name: Collect compute node diagnostics on head node
21 hosts: compute
Zack Williams04106732016-06-27 20:55:32 -070022 tasks:
23 - synchronize:
24 src: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
25 dest: "~/{{ hostvars[groups['head'][0]]['diag_dir'] }}/"
26 recursive: yes
27 mode: pull
28 delegate_to: "{{ groups['head'][0] }}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070029