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: I88ed387ad2ea19ee303c6d016d08e280ff3dab44
This commit is contained in:
Dmitriy Rabotyagov 2024-07-22 14:27:31 +02:00
parent 57a5f46142
commit caaab70104

View File

@ -16,7 +16,7 @@
_barbican_is_first_play_host: >-
{{
(barbican_services['barbican-api']['group'] in group_names and
inventory_hostname == (groups[barbican_services['barbican-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
inventory_hostname == (groups[barbican_services['barbican-api']['group']] | select('in', ansible_play_hosts)) | first) | bool
}}
_barbican_oslomsg_rpc_vhost_conf: >-