Hi,
I’m pretty new to Ansible and so far have spent only an afternoon with the Ansible Azure module - so it’s likely I’m being dim…
After a bit of trial and error I got a playbook together that can create a basic VM (along with the virtual networking gubbins to make it accessible etc.) - very cool, thanks to all who made that possible
One aspect that caught me by surprise was that I couldn’t specify a premium storage compatible VM size…
I’m using Ansible 2.3.1.0 and have Azure v2.0.0RC5 installed (running on an up-to-date MacBook Pro).
In the azure_rm_virtualmachine task, the create process works ok (so long as the storage account used for the VM is account_type: Standard_LRS) if a VM size is specified along the lines of:
vm_size: Standard_D3_v2
Where I got problems was trying to use Premium_LTS for the storage account and:
vm_size: Standard_F4s
Which resulted in the error message:
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “value of vm_size must be one of: Basic_A0,Basic_A1,Basic_A2,Basic_A3,Basic_A4,Standard_A0,Standard_A1,Standard_A10,Standard_A11,Standard_A2,Standard_A3,Standard_A4,Standard_A5,Standard_A6,Standard_A7,Standard_A8,Standard_A9,Standard_D1,Standard_D11,Standard_D11_v2,Standard_D12,Standard_D12_v2,Standard_D13,Standard_D13_v2,Standard_D14,Standard_D14_v2,Standard_D15_v2,Standard_D1_v2,Standard_D2,Standard_D2_v2,Standard_D3,Standard_D3_v2,Standard_D4,Standard_D4_v2,Standard_D5_v2,Standard_DS1,Standard_DS11,Standard_DS11_v2,Standard_DS12,Standard_DS12_v2,Standard_DS13,Standard_DS13_v2,Standard_DS14,Standard_DS14_v2,Standard_DS15_v2,Standard_DS1_v2,Standard_DS2,Standard_DS2_v2,Standard_DS3,Standard_DS3_v2,Standard_DS4,Standard_DS4_v2,Standard_DS5_v2,Standard_G1,Standard_G2,Standard_G3,Standard_G4,Standard_G5,Standard_GS1,Standard_GS2,Standard_GS3,Standard_GS4,Standard_GS5, got: Standard_F4s”}
Clearly Standard_F4s is not in the permitted list… nor are any of the machines such as Standard_DS3_v2 (which I think would be a fairly common premium storage compatible general purpose box)
However, checking the list of valid VM sizes in the location I’m asking for the VM to be created in via the Azure CLI shows that Standard_F4s is valid (as far as Azure is concerned):
azure vm sizes --location uksouth
…
Standard_DS14_v2_Promo
Standard_F1s
Standard_F2s
Standard_F4s
Standard_F8s
Standard_F16s
Standard_A1_v2
…
Is there something I’m doing wrong here or might there be a bug in the Azure module where the range of valid vm_size values is overly restrictive?
Cheers, Andy