1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixed the missing argument to get_eip_allocation_id_by_address

This commit is contained in:
Allen Sanabria 2016-03-23 09:00:04 -07:00 committed by Matt Clay
parent 0d7d778c82
commit ec2b499959

View file

@ -681,7 +681,7 @@ def create(client, subnet_id, allocation_id, client_token=None,
def pre_create(client, subnet_id, allocation_id=None, eip_address=None, def pre_create(client, subnet_id, allocation_id=None, eip_address=None,
if_exist_do_not_create=False, wait=False, wait_timeout=0, if_exist_do_not_create=False, wait=False, wait_timeout=0,
client_token=None): client_token=None, check_mode=False):
"""Create an Amazon NAT Gateway. """Create an Amazon NAT Gateway.
Args: Args:
client (botocore.client.EC2): Boto3 client client (botocore.client.EC2): Boto3 client
@ -747,7 +747,11 @@ def pre_create(client, subnet_id, allocation_id=None, eip_address=None,
elif eip_address or allocation_id: elif eip_address or allocation_id:
if eip_address and not allocation_id: if eip_address and not allocation_id:
allocation_id = get_eip_allocation_id_by_address(client) allocation_id = (
get_eip_allocation_id_by_address(
client, eip_address, check_mode=check_mode
)
)
existing_gateways, allocation_id_exists = ( existing_gateways, allocation_id_exists = (
gateway_in_subnet_exists(client, subnet_id, allocation_id) gateway_in_subnet_exists(client, subnet_id, allocation_id)