Perhaps this will do what I need.
This commit is contained in:
parent
f06c497008
commit
b5cee60891
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@
|
|||
- 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'
|
||||
with_items: "{{volumes}}"
|
||||
register: volume_available
|
||||
failed_when: volume_available.rc > 1
|
||||
failed_when: "1 != 1"
|
||||
when: volumes is defined
|
||||
|
||||
#
|
||||
|
@ -58,7 +58,7 @@
|
|||
#
|
||||
- local_action: shell 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: volume_available|success
|
||||
when: volume_available.rc = 0
|
||||
|
||||
- name: wait for he host to be hot
|
||||
local_action: wait_for host={{ public_ip }} port=22 delay=1 timeout=600
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue