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: I0396f7fbbc947d04beb28626c8e1f297623d8964
This commit is contained in:
Dmitriy Rabotyagov 2024-07-22 15:59:03 +02:00
parent 00b5f37d1d
commit 9efd1d8842

View File

@ -16,7 +16,7 @@
_mistral_is_first_play_host: >-
{{
(mistral_services['mistral-api']['group'] in group_names and
inventory_hostname == (groups[mistral_services['mistral-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
inventory_hostname == (groups[mistral_services['mistral-api']['group']] | select('in', ansible_play_hosts)) | first) | bool
}}
_mistral_oslomsg_rpc_vhost_conf: >-
{{