New in version 2.8.
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 |
|
|
load_balancer_id
required |
ID of server load balancer.
aliases: lb_id |
|
| name_prefix |
Use a vritual server group name prefix to filter vserver groups.
|
|
| vserver_group_ids |
A list of SLB vserver group ids.
aliases: group_ids, ids |
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.
- name: Retrieving vsgs using slb id
ali_slb_vsg_facts:
lb_id: '{{item}}'
with_items: '{{slbs.ids}}'
- name: Filter vsg using name_regex
ali_slb_vsg_facts:
name_prefix: 'ansible-foo'
lb_id: 'lb-cn3cn34'
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | ||
|---|---|---|---|---|
|
ids
list
|
when success |
List ids of being fetched virtual server group.
Sample:
['rsp-2zehblhcv', 'rsp-f22c4lhcv']
|
||
|
names
list
|
when success |
List name of being fetched virtual server group.
Sample:
['ansible-1', 'ansible-2']
|
||
|
vserver_groups
complex
|
on present |
info about the virtual server group that was created or deleted.
|
||
|
name
string
|
always |
The name of the virtual server group was created.
Sample:
ansible-ali_slb_vsg
|
||
|
tags
complex
|
always |
The load balancer tags
|
||
|
vserver_group_name
string
|
always |
The name of the virtual server group was created.
Sample:
ansible-ali_slb_vsg
|
||
|
address
string
|
always |
The IP address of the loal balancer
Sample:
47.94.26.126
|
||
|
vserver_group_id
string
|
always |
The ID of the virtual server group was created.
Sample:
rsp-2zehblhcv
|
||
|
backend_servers
complex
|
always |
The load balancer's backend servers
|
||
|
server_id
string
|
always |
The backend server id
Sample:
i-vqunci342
|
||
|
type
string
|
always |
The backend server type, ecs or eni
Sample:
ecs
|
||
|
port
int
|
always |
The backend server port
Sample:
22
|
||
|
weight
int
|
always |
The backend server weight
Sample:
100
|
||
|
id
string
|
always |
The ID of the virtual server group was created. Same as vserver_group_id.
Sample:
rsp-2zehblhcv
|
||
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.