From 6643fe821e51b22ec1d08ed8efcc10d757251de3 Mon Sep 17 00:00:00 2001 From: charliejllewellyn Date: Wed, 10 Jan 2018 19:09:53 +0000 Subject: [PATCH] Fix storage endpoint for Azure Stack (#33946) * Fix storage endpoint for Azure Stack https://github.com/Azure/msrestazure-for-python/issues/64 * corrected visual indentation --- .../modules/cloud/azure/azure_rm_virtualmachine.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py index cbdf2060ab8..3d36224c3d8 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py @@ -785,12 +785,11 @@ class AzureRMVirtualMachine(AzureRMModuleBase): self.storage_blob_name = self.name if self.storage_account_name and not self.managed_disk_type: - self.get_storage_account(self.storage_account_name) + properties = self.get_storage_account(self.storage_account_name) - requested_vhd_uri = 'https://{0}.blob.{1}/{2}/{3}'.format(self.storage_account_name, - self._cloud_environment.suffixes.storage_endpoint, - self.storage_container_name, - self.storage_blob_name) + requested_vhd_uri = '{0}{1}/{2}'.format(properties.primary_endpoints.blob, + self.storage_container_name, + self.storage_blob_name) disable_ssh_password = not self.ssh_password_enabled