mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 16:06:43 +00:00
Fixed ec2_eip.py when assigning a standard elastic IP. (#19238)
This commit is contained in:
@@ -312,7 +312,7 @@ def ensure_present(ec2, module, domain, address, private_ip_address, device_id,
|
||||
if isinstance:
|
||||
instance = find_device(ec2, module, device_id)
|
||||
if reuse_existing_ip_allowed:
|
||||
if len(instance.vpc_id) > 0 and domain is None:
|
||||
if instance.vpc_id and len(instance.vpc_id) > 0 and domain is None:
|
||||
raise EIPException("You must set 'in_vpc' to true to associate an instance with an existing ip in a vpc")
|
||||
# Associate address object (provided or allocated) with instance
|
||||
assoc_result = associate_ip_and_device(ec2, address, private_ip_address, device_id,
|
||||
|
||||
Reference in New Issue
Block a user