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: |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 7 | - name: Set diag_dir name to diag-rfc3339_datetime |
| 8 | set_fact: |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 9 | diag_dir: "diag-{{ ansible_date_time.iso8601_basic_short }}" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 10 | |
Zack Williams | 2bfbbd6 | 2016-06-13 10:18:19 -0700 | [diff] [blame] | 11 | - name: Diagnostics on head node |
| 12 | hosts: head |
| 13 | roles: |
| 14 | - head-diag |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 15 | |
| 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 Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 23 | tasks: |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 24 | - name: rsync diag_dir from compute nodes |
| 25 | synchronize: |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 26 | 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 Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 31 | |