tasks: cinder_qos: Ommit nonexistent volume types

This will skip association of QoS rules to volume types that
doesn't exist.

Depends-On: https://review.openstack.org/615869
Change-Id: I513b2b8c5a1468f98e784ed71e47f56b93ec910b
This commit is contained in:
Damian Cikowski 2018-11-08 00:13:24 +01:00
parent 687fb0146a
commit 0e512e3089
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,9 @@
. {{ ansible_env.HOME }}/openrc
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
{% for vtype in item.cinder_volume_types %}
{{ cinder_bin }}/openstack volume qos associate {{ item.name }} {{ vtype }}
if {{ cinder_bin }}/openstack volume type show "{{ vtype }}"; then
{{ cinder_bin }}/openstack volume qos associate {{ item.name }} {{ vtype }}
fi
{% endfor %}
args:
executable: /bin/bash