From 1842495fcb0558638b5ed3ee7bed6de9e1739b89 Mon Sep 17 00:00:00 2001 From: Ian Wienand <iwienand@redhat.com> Date: Thu, 2 Jul 2020 15:59:15 +1000 Subject: [PATCH] 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 --- 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 b02498ff5..f49871bfc 100644 --- a/roles/emit-job-header/tasks/main.yaml +++ b/roles/emit-job-header/tasks/main.yaml @@ -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'] }}