mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Azure: Add Availability Zones (#49243)
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
This commit is contained in:
parent
e8e22e31dc
commit
f29256e4da
3 changed files with 62 additions and 7 deletions
|
@ -546,7 +546,7 @@ class AzureRMModuleBase(object):
|
|||
self.fail("Error creating blob service client for storage account {0} - {1}".format(storage_account_name,
|
||||
str(exc)))
|
||||
|
||||
def create_default_pip(self, resource_group, location, public_ip_name, allocation_method='Dynamic'):
|
||||
def create_default_pip(self, resource_group, location, public_ip_name, allocation_method='Dynamic', sku=None):
|
||||
'''
|
||||
Create a default public IP address <public_ip_name> to associate with a network interface.
|
||||
If a PIP address matching <public_ip_name> exists, return it. Otherwise, create one.
|
||||
|
@ -555,6 +555,7 @@ class AzureRMModuleBase(object):
|
|||
:param location: a valid azure location
|
||||
:param public_ip_name: base name to assign the public IP address
|
||||
:param allocation_method: one of 'Static' or 'Dynamic'
|
||||
:param sku: sku
|
||||
:return: PIP object
|
||||
'''
|
||||
pip = None
|
||||
|
@ -574,6 +575,7 @@ class AzureRMModuleBase(object):
|
|||
params = self.network_models.PublicIPAddress(
|
||||
location=location,
|
||||
public_ip_allocation_method=allocation_method,
|
||||
sku=sku
|
||||
)
|
||||
self.log('Creating default public IP {0}'.format(public_ip_name))
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue