finalize attaching volumes
final touch after testing. This really works.
This commit is contained in:
parent
263c2f9f19
commit
92b607351f
2 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,11 @@ public_ip: 209.132.184.179
|
|||
root_auth_users: bkabrda msuchy tradej pingou vgologuz
|
||||
description: copr dispatcher and repo server - dev instance
|
||||
tcp_ports: ['22', '80', '443']
|
||||
# volumes: copr-be-dev-db
|
||||
volumes: [ {volume_id: 'b41e4d70-8f76-44b5-ab24-d91f02ae0afa', device: '/dev/vdc'} ]
|
||||
inventory_tenant: persistent
|
||||
# name of machine in OpenStack
|
||||
inventory_instance_name: copr-be-dev
|
||||
|
||||
# Copr vars
|
||||
copr_hostbase: copr-be-dev
|
||||
|
|
|
@ -63,5 +63,6 @@
|
|||
# when: volumes is defined and vm_status.stdout != "ACTIVE"
|
||||
|
||||
# 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
|
||||
# volume must be id
|
||||
- shell: source keystonerc_admin && nova --os-tenant-name={{inventory_tenant}} volume-list | grep ' {{item.volume_id}} ' | grep 'available' && nova --os-tenant-name={{inventory_tenant}} volume-attach "{{inventory_instance_name}}" "{{item.volume_id}}" "{{item.device}}"
|
||||
with_items: volumes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue