From 3d385e9d3f96d51957e6b8b5bec91d13f93cd725 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 22 Jul 2024 16:10:08 +0200 Subject: [PATCH] Ensure that first/last host detection is deterministic With ansible-core 2.16 a breaking changes landed [1] to some filters making their result returned in arbitrary order. With that, we were relying on them to always return exactly same ordered lists. With that we need to ensure that we still have determenistic behaviour where this is important. [1] https://github.com/ansible/ansible/issues/82554 Change-Id: If26ec122b8defaa1dc1a44f8d6cb2510982cfdf7 --- vars/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/main.yml b/vars/main.yml index 9537fccf..77e702fc 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -16,7 +16,7 @@ _nova_is_first_play_host: >- {{ (nova_services['nova-conductor']['group'] in group_names and - inventory_hostname == (groups[nova_services['nova-conductor']['group']] | intersect(ansible_play_hosts)) | first) | bool + inventory_hostname == (groups[nova_services['nova-conductor']['group']] | select('in', ansible_play_hosts)) | first) | bool }} _nova_oslomsg_rpc_vhost_conf: >-