Zack Williams | 2bfbbd6 | 2016-06-13 10:18:19 -0700 | [diff] [blame] | 1 | --- |
| 2 | # Collects diagnostic information for the currently running cord-pod config |
| 3 | |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 4 | - name: Create diag_dir fact |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 5 | hosts: head |
| 6 | tasks: |
| 7 | - set_fact: |
| 8 | diag_dir: "diag-{{ ansible_date_time.iso8601_basic_short }}" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 9 | |
Zack Williams | 2bfbbd6 | 2016-06-13 10:18:19 -0700 | [diff] [blame] | 10 | - name: Diagnostics on head node |
| 11 | hosts: head |
| 12 | roles: |
| 13 | - head-diag |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 14 | |
| 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 Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 22 | 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 Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 29 | |