ignore error if volume is already attached
This commit is contained in:
parent
84966d9757
commit
ba003ae49d
1 changed files with 1 additions and 0 deletions
|
@ -70,5 +70,6 @@
|
||||||
# volume must be id
|
# volume must be id
|
||||||
- local_action: shell nova --os-auth-url="{{os_auth_url}}" --os-username="admin" --os-password="{{ADMIN_PASS}}" --os-tenant-name={{inventory_tenant}} volume-list | grep ' {{item.volume_id}} ' | grep 'available' && nova --os-auth-url="{{os_auth_url}}" --os-username="admin" --os-password="{{ADMIN_PASS}}" --os-tenant-name={{inventory_tenant}} volume-attach "{{inventory_instance_name}}" "{{item.volume_id}}" "{{item.device}}"
|
- local_action: shell nova --os-auth-url="{{os_auth_url}}" --os-username="admin" --os-password="{{ADMIN_PASS}}" --os-tenant-name={{inventory_tenant}} volume-list | grep ' {{item.volume_id}} ' | grep 'available' && nova --os-auth-url="{{os_auth_url}}" --os-username="admin" --os-password="{{ADMIN_PASS}}" --os-tenant-name={{inventory_tenant}} volume-attach "{{inventory_instance_name}}" "{{item.volume_id}}" "{{item.device}}"
|
||||||
with_items: volumes
|
with_items: volumes
|
||||||
|
ignore_errors: yes
|
||||||
when: volumes is defined
|
when: volumes is defined
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue