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: I16efdde91dc0fa2666ff27e5d34dd0f745958551
This commit is contained in:
Dmitriy Rabotyagov 2024-07-22 15:21:55 +02:00
parent 8207157026
commit 96cd191579

View File

@ -16,7 +16,7 @@
_glance_is_first_play_host: >-
{{
(glance_services['glance-api']['group'] in group_names and
inventory_hostname == (groups[glance_services['glance-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
inventory_hostname == (groups[glance_services['glance-api']['group']] | select('in', ansible_play_hosts)) | first) | bool
}}
_glance_oslomsg_rpc_vhost_conf: >-