From 436089d596552164d942342362724c1542fbc5ca Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 22 Jul 2024 16:19:17 +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: I93deb022cdd83003f92e54a523f6db833ce5bf97 --- vars/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/main.yml b/vars/main.yml index 248889a..6d13b0d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -16,7 +16,7 @@ # limitations under the License. _tacker_is_first_play_host: >- - {{ ('tacker_all' in group_names and inventory_hostname == (groups['tacker_all'] | intersect(ansible_play_hosts)) | first) | bool }} + {{ ('tacker_all' in group_names and inventory_hostname == (groups['tacker_all'] | select('in', ansible_play_hosts)) | first) | bool }} _tacker_oslomsg_rpc_vhost_conf: >- {{