New in version 2.8.0.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| alicloud_access_key |
Aliyun Cloud access key. If not set then the value of environment variable
ALICLOUD_ACCESS_KEY, ALICLOUD_ACCESS_KEY_ID will be used instead.aliases: access_key_id, access_key |
|
| alicloud_region |
The Aliyun Cloud region to use. If not specified then the value of environment variable
ALICLOUD_REGION, ALICLOUD_REGION_ID will be used instead.aliases: region, region_id |
|
| alicloud_secret_key |
Aliyun Cloud secret key. If not set then the value of environment variable
ALICLOUD_SECRET_KEY, ALICLOUD_SECRET_ACCESS_KEY will be used instead.aliases: secret_access_key, secret_key |
|
| alicloud_security_token |
The Aliyun Cloud security token. If not specified then the value of environment variable
ALICLOUD_SECURITY_TOKEN will be used instead.aliases: security_token |
|
| eni_ids |
A list of ENI IDs that exist in your account.
aliases: ids |
|
| filters |
A dict of filters to apply. Each dict item consists of a filter key and a filter value. The filter keys can be all of request parameters. See https://www.alibabacloud.com/help/doc-detail/58512.htm for parameter details. Filter keys can be same as request parameter name or be lower case and use underscore ("_") or dashes ("-") to connect different words in one parameter. 'Tag.n.Key' and 'Tag.n.Value' should be a dict and using 'tags' instead. 'NetworkInterfaceId.N' will be appended to eni_ids automatically.
|
|
| name_prefix |
Use a name prefix to filter network interfaces.
|
|
| tags |
A hash/dictionaries of network interface tags.
{"key":"value"} |
Note
ALICLOUD_ACCESS_KEY or ALICLOUD_ACCESS_KEY_ID, ALICLOUD_SECRET_KEY or ALICLOUD_SECRET_ACCESS_KEY, ALICLOUD_REGION or ALICLOUD_REGION_ID, ALICLOUD_SECURITY_TOKENALICLOUD_REGION or ALICLOUD_REGION_ID can be typically be used to specify the ALICLOUD region, when required, but this can also be configured in the footmark config file# Note: These examples do not set authentication details, see the Alibaba Cloud Guide for details.
# Gather facts about all ENIs
- ali_eni_facts:
# Gather facts about a particular ENI
- ali_eni_facts:
eni_ids:
- eni-xxxxxxx
- eni-yyyyyyy
filters:
type: Secondary
# Gather facts about a particular ENI
- ali_eni_facts:
filters:
network_interface_name: my-test-eni
type: Secondary
# Gather facts based on vpc and name_prefix
- ali_eni_facts:
name_prefix: foo
filters:
vswitch_id: vpc-dsfh2ef2
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | |
|---|---|---|---|
|
ids
list
|
always |
List of elastic network interface IDs
Sample:
['eni-12345er', 'eni-3245fs']
|
|
|
interfaces
complex
|
always |
List of matching elastic network interfaces
|
|
|
description
string
|
interface description
Sample:
My new network interface
|
||
|
tags
dict
|
always |
Any tags assigned to the ENI.
|
|
|
creation_time
string
|
always |
The time the eni was created.
Sample:
2018-06-25T04:08Z
|
|
|
associated_public_ip
string
|
The public IP address associated with the ENI.
Sample:
42.1.10.1
|
||
|
id
string
|
network interface id (alias for network_interface_id)
Sample:
eni-123456
|
||
|
security_groups
list
|
list of security group ids
Sample:
['sg-f8a8a9da', 'sg-xxxxxx']
|
||
|
zone_id
string
|
always |
The availability zone of the ENI is in.
Sample:
cn-beijing-a
|
|
|
name
string
|
interface name
Sample:
my-eni
|
||
|
vswitch_id
string
|
which vswitch the interface is bound
Sample:
vsw-b33i43f3
|
||
|
network_interface_id
string
|
network interface id
Sample:
eni-123456
|
||
|
instance_id
string
|
Attached instance id
Sample:
i-123456
|
||
|
state
string
|
network interface status
Sample:
pending
|
||
|
private_ip_addresses
list of dictionaries
|
list of all private ip addresses associated to this interface
Sample:
[{'private_ip_address': '10.20.30.40', 'primary_address': True}]
|
||
|
mac_address
string
|
interface's physical address
Sample:
00:00:5E:00:53:23
|
||
|
private_ip_address
string
|
primary ip address of this interface
Sample:
10.20.30.40
|
||
|
vpc_id
string
|
which vpc this network interface is bound
Sample:
vpc-cj3ht4ogn
|
||
|
type
string
|
type of the ENI
Sample:
Secondary
|
||
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Hint
If you notice any issues in this documentation you can edit this document to improve it.