this must be local action, not remote one
This commit is contained in:
parent
dc91001f94
commit
84966d9757
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@
|
|||
|
||||
# instance can be both id and name, volume must be id
|
||||
# volume must be id
|
||||
- shell: nova --os-cacert="{{ files }}/fedora-cloud/fed-cloud09.pem" --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' && echo nova --insecure --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
|
||||
when: volumes is defined
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue