diff --git a/roles/cloud-azure/tasks/main.yml b/roles/cloud-azure/tasks/main.yml index dfdde2e5..7c6f1fc9 100644 --- a/roles/cloud-azure/tasks/main.yml +++ b/roles/cloud-azure/tasks/main.yml @@ -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 }}"