From ea51a70aa687dc35af6c68df3f3667577f769468 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Wed, 12 Aug 2020 14:02:18 -0400 Subject: [PATCH] ansible: Set nodename=ansible_hostname on static builders Signed-off-by: David Galloway --- ansible/examples/slave.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/examples/slave.yml b/ansible/examples/slave.yml index d2d5355a..11d6374b 100644 --- a/ansible/examples/slave.yml +++ b/ansible/examples/slave.yml @@ -239,6 +239,12 @@ with_items: "{{ ansible_all_ipv4_addresses }}" when: "item.startswith('172.21.')" + ## Let's make sure nodename gets set using our Sepia hostnames if the builder's in Sepia + - set_fact: + nodename: "{{ ansible_hostname }}" + with_items: "{{ ansible_all_ipv4_addresses }}" + when: "item.startswith('172.21.')" + ## EPHEMERAL SLAVE TASKS # We would occasionally have issues with name resolution on the Ephemeral slaves # so we force them to use Google's DNS servers. This has to be done before -- 2.39.5