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: Id2aaa7d32b6a0c25699e6e8031ae23480efdbad3
This commit is contained in:
Dmitriy Rabotyagov 2024-07-22 15:36:56 +02:00
parent f7a63626fc
commit 8980eacd67

View File

@ -16,12 +16,12 @@
_ironic_api_is_first_play_host: >-
{{
(ironic_services['ironic-api']['group'] in group_names and
inventory_hostname == (groups[ironic_services['ironic-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
inventory_hostname == (groups[ironic_services['ironic-api']['group']] | select('in', ansible_play_hosts)) | first) | bool
}}
_ironic_inspector_is_first_play_host: >-
{{
(ironic_services['ironic-inspector']['group'] in group_names and
inventory_hostname == (groups[ironic_services['ironic-inspector']['group']] | intersect(ansible_play_hosts)) | first) | bool
inventory_hostname == (groups[ironic_services['ironic-inspector']['group']] | select('in', ansible_play_hosts)) | first) | bool
}}
_ironic_oslomsg_rpc_vhost_conf: >-
{{