try this and see if it fixes volume handling in new ansible

This commit is contained in:
Kevin Fenzi 2016-06-23 21:23:34 +00:00
parent d0fa57a8a6
commit 2729f700bf
2 changed files with 19 additions and 19 deletions

View file

@ -45,7 +45,7 @@
# instance can be both id and name, 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}}"
with_items: volumes
with_items: "{{volumes}}"
ignore_errors: yes
when: volumes is defined