From 28796a9a90b128d9cc3963cb240d52ae89225150 Mon Sep 17 00:00:00 2001 From: Vitaliy Lotorev Date: Sat, 31 Oct 2020 21:44:36 +0300 Subject: [PATCH] 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 --- roles/emit-job-header/tasks/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/emit-job-header/tasks/main.yaml b/roles/emit-job-header/tasks/main.yaml index f49871bfc..969feed79 100644 --- a/roles/emit-job-header/tasks/main.yaml +++ b/roles/emit-job-header/tasks/main.yaml @@ -29,6 +29,7 @@ # Node Information Inventory Hostname: {{ zj_item }} 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') }} Provider: {{ hostvars[zj_item]['nodepool']['provider'] }} Label: {{ hostvars[zj_item]['nodepool']['label'] }}