From d8785d5a981f98cb1c6f6a71b1cb22a208bb52d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 23 Mar 2015 08:54:44 +0000 Subject: [PATCH] attach volumes only when there are volumes to attach --- tasks/persistent_cloud_new.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/persistent_cloud_new.yml b/tasks/persistent_cloud_new.yml index 0a2c301ff0..cc4ef70f3e 100644 --- a/tasks/persistent_cloud_new.yml +++ b/tasks/persistent_cloud_new.yml @@ -66,3 +66,6 @@ # volume must be id - shell: source keystonerc_admin && nova --os-tenant-name={{inventory_tenant}} volume-list | grep ' {{item.volume_id}} ' | grep 'available' && nova --os-tenant-name={{inventory_tenant}} volume-attach "{{inventory_instance_name}}" "{{item.volume_id}}" "{{item.device}}" with_items: volumes + # FIXME finish 'and vm_status.stdout != "ACTIVE"' when we know what vm_status will be + when: volumes is defined and vm_status.stdout != "ACTIVE" +