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: I66d23f9e52ef53b1a462878ea2d94cb01faed717
This commit is contained in:
parent
7cedd910d0
commit
eb70c981dd
@ -16,17 +16,17 @@
|
||||
_cinder_is_first_api_play_host: >-
|
||||
{{
|
||||
(cinder_services['cinder-api']['group'] in group_names and
|
||||
inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||
inventory_hostname == (groups[cinder_services['cinder-api']['group']] | select('in', ansible_play_hosts)) | first) | bool
|
||||
}}
|
||||
_cinder_is_first_play_host: >-
|
||||
{{
|
||||
(cinder_services['cinder-scheduler']['group'] in group_names and
|
||||
inventory_hostname == (groups[cinder_services['cinder-scheduler']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||
inventory_hostname == (groups[cinder_services['cinder-scheduler']['group']] | select('in', ansible_play_hosts)) | first) | bool
|
||||
}}
|
||||
_cinder_is_last_play_host: >-
|
||||
{{
|
||||
(cinder_services['cinder-api']['group'] in group_names and
|
||||
inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | last) | bool
|
||||
inventory_hostname == (groups[cinder_services['cinder-api']['group']] | select('in', ansible_play_hosts)) | last) | bool
|
||||
}}
|
||||
|
||||
_cinder_rootwrap_conf_overrides:
|
||||
|
Loading…
x
Reference in New Issue
Block a user