ansible-azure
ansible-azure copied to clipboard
Using Managed storage results in the ansible Azure ARM plugin failure
it seems that the msrest ansible plugin cannot handle the situation where no storage account is used for the for the osdisk of a vm. this fails client/server side vaildations.
One solution would be to abandon the usage of the plugin as it obviously cannot keep pace with the api development. Switch to a command based approach?
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: msrest.exceptions.ValidationError: Parameter 'OSDisk.vhd' can not be None.
failed: [localhost] (item={'key': u'jumphost1', 'value': {u'datadisksize': 64, u'storagtype': u'Premium_LRS', u'machinesize': u'Standard_DS2_v2', u'name': u'jumphost1', u'tags': {u'region': u'westeurope', u'type': u'jumphost', u'zone': u'jumphost', u'stage': u'jumphost'}}}) => {"failed": true, "item": {"key": "jumphost1", "value": {"datadisksize": 64, "machinesize": "Standard_DS2_v2", "name": "jumphost1", "storagtype": "Premium_LRS", "tags": {"region": "westeurope", "stage": "jumphost", "type": "jumphost", "zone": "jumphost"}}}, "module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_yCJ0uk/ansible_module_azure_rm_virtualmachine.py", line 1305, in
@tahonen i updated the scripts to use managed disks (no more storage accounts).
This has resulted in basically all the the usages azure_arm_virtualmachine plugin to fail. Basically i'm using a more upto date api. Where the return values from azure api is not what the azure_arm_virtualmachine expects. (specifically that it always expects a osdisk to exist )
- Restart and tagging is broken.
I think from now on its best to start doing ansible "command" for the azure bits. The provisioing still works