emit-job-header: add inventory hostname

When you're running a multi-node job, it would be nice to see the
inventory hostname in this list, so if you want to say, monitor one of
the nodes, you don't have to guess which is which.

Change-Id: Ibf822d51711c74d963a7287eaeaa9a40ff074e79
This commit is contained in:
Ian Wienand 2020-07-02 15:59:15 +10:00
parent 5f6c714208
commit 1842495fcb

View File

@ -27,6 +27,7 @@
debug:
msg: |
# Node Information
Inventory Hostname: {{ zj_item }}
Hostname: {{ hostvars[zj_item]['ansible_hostname']|default('unknown') }}
Distro: {{ hostvars[zj_item]['ansible_distribution'] | default('unknown') }} {{ hostvars[zj_item]['ansible_distribution_version'] | default('unknown') }}
Provider: {{ hostvars[zj_item]['nodepool']['provider'] }}