attach volumes

This commit is contained in:
Miroslav Suchý 2015-03-20 13:04:24 +00:00
parent c1d072a1b5
commit 71842302f4

View file

@ -61,5 +61,7 @@
# local_action: "shell nova --insecure {{_OS_AUTH_OPTS}} volume-attach {{inventory_hostname}} {{item}} " # local_action: "shell nova --insecure {{_OS_AUTH_OPTS}} volume-attach {{inventory_hostname}} {{item}} "
# with_items: volumes # with_items: volumes
# when: volumes is defined and vm_status.stdout != "ACTIVE" # when: volumes is defined and vm_status.stdout != "ACTIVE"
nova --os-username=admin --os-password=c24da73c18e7880cbb6f --os-tenant-name=copr --os-auth-url="https://fed-cloud09.cloud.fedoraproject.org:5000/v2.0" volume-attach test ff735862-ac95-4b7f-82ba-081583e46898
nova --os-username=admin --os-password=c24da73c18e7880cbb6f --os-tenant-name=copr --os-auth-url="https://fed-cloud09.cloud.fedoraproject.org:5000/v2.0" volume-list |grep foo # instance can be both id and name, volume must be id
- shell: source keystonerc_admin && nova --os-tenant-name={{inventory_tenant}} volume-list | grep ' {{item}} ' | grep 'available' && nova --os-tenant-name={{inventory_tenant}} volume-attach "{{inventory_instance_name}}" "{{item}}"
with_items: inventory_volumes