From ba4ba20480d309845af77353f10d176303961bef Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Thu, 21 Jan 2021 11:23:24 +0100 Subject: [PATCH] Pick the first tester, undercloud or tempest node from inventory Change-Id: I26ec08ef20508feddb681718d91bd03a1ab3df24 --- infrared_plugin/roles/tobiko-ir-init/tasks/main.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/infrared_plugin/roles/tobiko-ir-init/tasks/main.yaml b/infrared_plugin/roles/tobiko-ir-init/tasks/main.yaml index 2a36f94cb..bfe4ba3d2 100644 --- a/infrared_plugin/roles/tobiko-ir-init/tasks/main.yaml +++ b/infrared_plugin/roles/tobiko-ir-init/tasks/main.yaml @@ -36,16 +36,14 @@ loop: "{{ find_tobiko_roles.files | map(attribute='path') | list }}" -- name: "select test host from inventory" +- name: "select tester host from the inventory" set_fact: test_host: '{{ item }}' when: - test_host is not defined - item in hostvars loop: - - tester-0 - - tester - - undercloud-0 - - undercloud - - tempest + - '{{ groups.get("tester", []) | first | default("tester") }}' + - '{{ groups.get("undercloud", []) | first | default("undercloud-0") }}' + - '{{ groups.get("tempest", []) | first | default("tempest") }}' - primary