get flavour_id before executing nova_compute
nova_compute do not accept flavour name, it must be id
This commit is contained in:
parent
d8785d5a98
commit
7ea4bcc622
1 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,9 @@
|
|||
# local_action: "nova_compute insecure=True auth_url={{OS_AUTH_URL}} login_username={{OS_USERNAME}} login_password={{OS_PASSWORD}} #login_tenant_name={{OS_TENANT_NAME}} name={{inventory_hostname}} image_id={{ image }} wait_for=300 flavor_id={{ flavor_id }} security_groups={{security_group}} key_name={{keypair}} nics=[{{}}]"
|
||||
# register: nova_result
|
||||
|
||||
- name: get flavour ID
|
||||
local_action: shell source /root/keystonerc_admin && nova | grep ' {{ instance_type }} ' | awk '{print $2}'
|
||||
register: FLAVOUR_ID
|
||||
|
||||
- name: spin UP VM using nova_compute
|
||||
#delegate_to: 127.0.0.1
|
||||
|
@ -43,7 +46,7 @@
|
|||
name: "{{inventory_hostname}}"
|
||||
image_id: "{{ image }}"
|
||||
wait_for: 300
|
||||
flavor_id: "{{ flavor_id }}" # TODO: conversion from `instance_type`
|
||||
flavor_id: "{{ FLAVOUR_ID.stdout }}"
|
||||
security_groups: "{{security_group}}"
|
||||
key_name: "{{ keypair }}"
|
||||
nics: "{{ cloud_networks }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue