diff --git a/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py b/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py index c32ea7f707..91df058b00 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py @@ -147,7 +147,7 @@ except ImportError: # This is handled in azure_rm_common pass -from ansible.module_utils.azure_rm_common import AZURE_SUCCESS_STATE, AzureRMModuleBase +from ansible.module_utils.azure_rm_common import AZURE_SUCCESS_STATE, AzureRMModuleBase, HAS_AZURE class AzureRMStorageAccount(AzureRMModuleBase): @@ -167,8 +167,9 @@ class AzureRMStorageAccount(AzureRMModuleBase): access_tier=dict(type='str', choices=['Hot', 'Cool']) ) - for key in self.storage_models.SkuName: - self.module_arg_spec['account_type']['choices'].append(getattr(key, 'value')) + if HAS_AZURE: + for key in self.storage_models.SkuName: + self.module_arg_spec['account_type']['choices'].append(getattr(key, 'value')) self.results = dict( changed=False, diff --git a/test/sanity/import/skip.txt b/test/sanity/import/skip.txt index 8a54937ee6..1c73c16ece 100644 --- a/test/sanity/import/skip.txt +++ b/test/sanity/import/skip.txt @@ -1,4 +1,3 @@ -lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py lib/ansible/modules/cloud/webfaction/webfaction_site.py lib/ansible/modules/clustering/k8s/k8s_raw.py lib/ansible/modules/clustering/k8s/k8s_scale.py