Add secondary addresses to facts
This commit is contained in:
parent
b51a662258
commit
1b0250125a
1 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,11 @@ except ImportError:
|
||||||
|
|
||||||
def get_eni_info(interface):
|
def get_eni_info(interface):
|
||||||
|
|
||||||
|
# Private addresses
|
||||||
|
private_addresses = []
|
||||||
|
for ip in interface.private_ip_addresses:
|
||||||
|
private_addresses.append({ 'private_ip_address': ip.private_ip_address, 'primary_address': ip.primary })
|
||||||
|
|
||||||
interface_info = {'id': interface.id,
|
interface_info = {'id': interface.id,
|
||||||
'subnet_id': interface.subnet_id,
|
'subnet_id': interface.subnet_id,
|
||||||
'vpc_id': interface.vpc_id,
|
'vpc_id': interface.vpc_id,
|
||||||
|
@ -65,6 +70,7 @@ def get_eni_info(interface):
|
||||||
'private_ip_address': interface.private_ip_address,
|
'private_ip_address': interface.private_ip_address,
|
||||||
'source_dest_check': interface.source_dest_check,
|
'source_dest_check': interface.source_dest_check,
|
||||||
'groups': dict((group.id, group.name) for group in interface.groups),
|
'groups': dict((group.id, group.name) for group in interface.groups),
|
||||||
|
'private_ip_addresses': private_addresses
|
||||||
}
|
}
|
||||||
|
|
||||||
if interface.attachment is not None:
|
if interface.attachment is not None:
|
||||||
|
|
Loading…
Reference in a new issue