emit-job-header: Print username in node information

Knowing username for node is required for jobs running on static nodes.
as static node can have multiple connections with different users
(see [1] and [2]).

[1] https://zuul-ci.org/docs/nodepool/configuration.html#attr-providers.[static].pools.nodes.username
[2] https://review.opendev.org/#/c/659209/

Change-Id: I3c726c40ee024de18e65b7888b73f505232422c2
This commit is contained in:
Vitaliy Lotorev 2020-10-31 21:44:36 +03:00
parent 73a2da3b12
commit 28796a9a90

View File

@ -29,6 +29,7 @@
# Node Information # Node Information
Inventory Hostname: {{ zj_item }} Inventory Hostname: {{ zj_item }}
Hostname: {{ hostvars[zj_item]['ansible_hostname']|default('unknown') }} Hostname: {{ hostvars[zj_item]['ansible_hostname']|default('unknown') }}
Username: {{ hostvars[zj_item]['ansible_user']|default('unknown') }}
Distro: {{ hostvars[zj_item]['ansible_distribution'] | default('unknown') }} {{ hostvars[zj_item]['ansible_distribution_version'] | default('unknown') }} Distro: {{ hostvars[zj_item]['ansible_distribution'] | default('unknown') }} {{ hostvars[zj_item]['ansible_distribution_version'] | default('unknown') }}
Provider: {{ hostvars[zj_item]['nodepool']['provider'] }} Provider: {{ hostvars[zj_item]['nodepool']['provider'] }}
Label: {{ hostvars[zj_item]['nodepool']['label'] }} Label: {{ hostvars[zj_item]['nodepool']['label'] }}