From 56a41ab760b1060b7c23e0e5ace4d654814bf257 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 22 Jul 2024 16:11:20 +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: I6c14dc2d153995b4045e34318e5e857ddad42019 --- vars/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/main.yml b/vars/main.yml index 790ae2a1..2c314125 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -16,7 +16,7 @@ _octavia_is_first_play_host: >- {{ (octavia_services['octavia-api']['group'] in group_names and - inventory_hostname == (groups[octavia_services['octavia-api']['group']] | intersect(ansible_play_hosts)) | first) | bool + inventory_hostname == (groups[octavia_services['octavia-api']['group']] | select('in', ansible_play_hosts)) | first) | bool }} _octavia_oslomsg_rpc_vhost_conf: >-