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: I9cdc2ba3679e0dc7fc1f7636ae9efb90984c4652
This commit is contained in:
Dmitriy Rabotyagov 2024-07-22 16:07:47 +02:00
parent 4f0187e7fc
commit 0cf7321ff8

View File

@ -16,7 +16,7 @@
_neutron_is_first_play_host: >-
{{
(neutron_services['neutron-server']['group'] in group_names and inventory_hostname == (
groups[neutron_services['neutron-server']['group']] | intersect(ansible_play_hosts)) | first) | bool
groups[neutron_services['neutron-server']['group']] | select('in', ansible_play_hosts)) | first) | bool
}}
_neutron_oslomsg_rpc_vhost_conf: >-
{{