From 0e512e308905fbbec4f0cf4a075ff4757717186e Mon Sep 17 00:00:00 2001 From: Damian Cikowski Date: Thu, 8 Nov 2018 00:13:24 +0100 Subject: [PATCH] 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 --- tasks/cinder_qos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/cinder_qos.yml b/tasks/cinder_qos.yml index c130e133..37a93c5b 100644 --- a/tasks/cinder_qos.yml +++ b/tasks/cinder_qos.yml @@ -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