Add nodepool info to test-emit-job-header

We'd like to also display the node information at run time, which is
helpful if we ever need to debug / hold a running job.

Change-Id: Idcd4370e09639fe81b701bde10510d5828b283cc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-03-30 11:41:05 -04:00
parent fabfe265d7
commit d428fdf8c7
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 12 additions and 0 deletions

View File

@ -19,3 +19,15 @@
{% if zuul_log_url is defined and zuul_log_path is defined %}
Log URL (when completed): {{ zuul_log_url }}/{{ zuul_log_path }}
{% endif %}
- name: Print node information
debug:
msg: |
# Node Information
Hostname: {{ hostvars[item]['ansible_hostname'] }}
Provider: {{ hostvars[item]['nodepool']['provider'] }}
Label: {{ hostvars[item]['nodepool']['label'] }}
{% if hostvars[item]['nodepool']['interface_ip'] is defined %}
Interface IP: {{ hostvars[item]['nodepool']['interface_ip'] }}
{% endif %}
loop: "{{ query('inventory_hostnames', 'all,!localhost') }}"