mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Azure: Add Availability Zones (#49243)
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
This commit is contained in:
committed by
Zim Kalinowski
parent
e8e22e31dc
commit
f29256e4da
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user