Handle vm_size choice in "Create an Instance" step

Use the variable passed in that the user chose for vm_size.
This commit is contained in:
Josh Meisels 2017-03-27 22:13:05 -07:00 committed by GitHub
parent 84de52786e
commit a3c64bda1a

View file

@ -80,7 +80,8 @@
virtual_network: algo_net
name: "{{ azure_server_name }}"
ssh_password_enabled: false
vm_size: Standard_D1
# I have no idea how to use the variable I created and passed from Algo. Do I need this lookup stuff?
vm_size: "{{ vm_size | default(lookup('env','VM_SIZE')) }}"
tags:
Environment: Algo
ssh_public_keys:
@ -91,6 +92,8 @@
sku: '16.04-LTS'
version: latest
register: azure_rm_virtualmachine
# To-do: Add error handling - if vm_size requested is not available, can we fall back to another, ideally with a prompt?
- set_fact:
ip_address: "{{ azure_rm_virtualmachine.ansible_facts.azure_vm.properties.networkProfile.networkInterfaces[0].properties.ipConfigurations[0].properties.publicIPAddress.properties.ipAddress }}"