mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +00:00
Add a way to filter which volume service is running on a host or list which hosts run available volume services. Closes-Bug: #2010490 Change-Id: Icb17f6019a61d9346472d83ddcd2ad29c340ea05
24 lines
726 B
YAML
24 lines
726 B
YAML
---
|
|
- name: Fetch volume services
|
|
openstack.cloud.volume_service_info:
|
|
cloud: "{{ cloud }}"
|
|
register: volume_services
|
|
|
|
- name: Assert return values of volume_service_info module
|
|
assert:
|
|
that:
|
|
- volume_services.volume_services | length > 0
|
|
# allow new fields to be introduced but prevent fields from being removed
|
|
- expected_fields|difference(volume_services.volume_services[0].keys())|length == 0
|
|
|
|
- name: Fetch volume services with filters
|
|
openstack.cloud.volume_service_info:
|
|
cloud: "{{ cloud }}"
|
|
binary: "cinder-volume"
|
|
register: volume_services
|
|
|
|
- name: Assert return values of volume_service_info module
|
|
assert:
|
|
that:
|
|
- volume_services.volume_services | length > 0
|