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: Ia0ceeae1227a89c3f0276d54f5780617a0e7f49a
This commit is contained in:
Dmitriy Rabotyagov
2024-07-22 16:05:09 +02:00
parent 0a70ad7623
commit 8d574d7a41

View File

@@ -16,12 +16,12 @@
_manila_is_first_play_host: >- _manila_is_first_play_host: >-
{{ {{
(manila_services['manila-api']['group'] in group_names and (manila_services['manila-api']['group'] in group_names and
inventory_hostname == (groups[manila_services['manila-api']['group']] | intersect(ansible_play_hosts)) | first) | bool inventory_hostname == (groups[manila_services['manila-api']['group']] | select('in', ansible_play_hosts)) | first) | bool
}} }}
_manila_share_is_first_play_host: >- _manila_share_is_first_play_host: >-
{{ {{
(manila_services['manila-share']['group'] in group_names and (manila_services['manila-share']['group'] in group_names and
inventory_hostname == (groups[manila_services['manila-share']['group']] | intersect(ansible_play_hosts)) | first) | bool inventory_hostname == (groups[manila_services['manila-share']['group']] | select('in', ansible_play_hosts)) | first) | bool
}} }}
_manila_oslomsg_rpc_vhost_conf: >- _manila_oslomsg_rpc_vhost_conf: >-