Skip to content

Commit

Permalink
Fix azure_rm_virtualmachine (ansible#4174).
Browse files Browse the repository at this point in the history
  • Loading branch information
h-hirokawa committed Jul 13, 2016
1 parent 67dadf3 commit 977a6a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloud/azure/azure_rm_virtualmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,9 +1142,10 @@ def create_default_storage_account(self):
valid_name = False

# Attempt to find a valid storage account name
storage_account_name_base = self.name[:20].lower()
for i in range(0, 5):
rand = random.randrange(1000, 9999)
storage_account_name = self.name[:20] + str(rand)
storage_account_name = storage_account_name_base + str(rand)
if self.check_storage_account_name(storage_account_name):
valid_name = True
break
Expand Down

0 comments on commit 977a6a8

Please sign in to comment.