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: Ibfb8a08c38ac0d17f087c3f553b8e6e1cf707a4f
This commit is contained in:
Dmitriy Rabotyagov 2024-07-22 14:32:31 +02:00
parent 9200a92207
commit 648bff0d1d

View File

@ -16,7 +16,7 @@
_blazar_is_first_play_host: >-
{{
(blazar_services['blazar-api']['group'] in group_names and
inventory_hostname == ((groups[blazar_services['blazar-api']['group']] | intersect(ansible_play_hosts)) | list)[0]) | bool
inventory_hostname == ((groups[blazar_services['blazar-api']['group']] | select('in', ansible_play_hosts)) | list)[0]) | bool
}}
_blazar_oslomsg_rpc_vhost_conf: >-