cloudscale_ch.cloud.load_balancer_pool_member module – Manages load balancer pool members on the cloudscale.ch IaaS service
Note
This module is part of the cloudscale_ch.cloud collection (version 2.4.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cloudscale_ch.cloud
.
To use it in a playbook, specify: cloudscale_ch.cloud.load_balancer_pool_member
.
New in cloudscale_ch.cloud 2.3.0
Synopsis
Get, create, update, delete pool members on the cloudscale.ch IaaS service.
Parameters
Parameter |
Comments |
---|---|
The IP address to which traffic is sent. |
|
Timeout in seconds for calls to the cloudscale.ch API. This can also be passed in the Default: |
|
cloudscale.ch API token. This can also be passed in the |
|
cloudscale.ch API URL. This can also be passed in the Default: |
|
Pool member will not receive traffic if false. Default is true. Choices:
|
|
UUID of the load balancer pool. |
|
The port to which health monitor checks are sent. If not specified, protocol_port will be used. Default is null. |
|
Name of the load balancer pool member. Either name or uuid are required. |
|
The port to which actual traffic is sent. |
|
State of the load balancer pool member. Choices:
|
|
The subnet of the address must be specified here. |
|
Tags assosiated with the load balancer. Set this to |
|
UUID of the load balancer. Either name or uuid are required. |
Notes
Note
If uuid option is provided, it takes precedence over name for pool member selection. This allows to update the member’s name.
If no uuid option is provided, name is used for pool member selection. If more than one load balancer with this name exists, execution is aborted.
All operations are performed using the cloudscale.ch public API v1.
For details consult the full API documentation: https://www.cloudscale.ch/en/api/v1.
A valid API token is required for all operations. You can create as many tokens as you like using the cloudscale.ch control panel at https://control.cloudscale.ch.
Examples
# Create a pool member for a load balancer pool using registered variables
- name: Create a load balancer pool
cloudscale_ch.cloud.load_balancer_pool:
name: 'swimming-pool'
load_balancer: '514064c2-cfd4-4b0c-8a4b-c68c552ff84f'
algorithm: 'round_robin'
protocol: 'tcp'
tags:
project: ansible-test
stage: production
sla: 24-7
api_token: xxxxxx
register: load_balancer_pool
- name: Create a load balancer pool member
cloudscale_ch.cloud.load_balancer_pool_member:
name: 'my-shiny-swimming-pool-member'
load_balancer_pool: '{{ load_balancer_pool.uuid }}'
enabled: true
protocol_port: 8080
monitor_port: 8081
subnet: '70d282ab-2a01-4abb-ada5-34e56a5a7eee'
address: '172.16.0.100'
tags:
project: ansible-test
stage: production
sla: 24-7
api_token: xxxxxx
# Get load balancer pool member facts by name
- name: Get facts of a load balancer pool member by name
cloudscale_ch.cloud.load_balancer_pool_member:
name: 'my-shiny-swimming-pool-member'
api_token: xxxxxx
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The IP address to which traffic is sent Returned: success Sample: |
|
The creation date and time of the load balancer pool member Returned: success when not state == absent Sample: |
|
THe status of the load balancer pool member Returned: success Sample: |
|
API URL to get details about this load balancer Returned: success when not state == absent Sample: |
|
The port to which health monitor checks are sent Returned: success Sample: |
|
The status of the pool’s health monitor check for this member Returned: success Sample: |
|
The display name of the load balancer pool member Returned: success Sample: |
|
The pool of the pool member Returned: success Sample: |
|
The port to which actual traffic is sent Returned: success Sample: |
|
The subnet in a private network in which address is located Returned: success Sample: |
|
Tags assosiated with the load balancer Returned: success Sample: |
|
The unique identifier for this load balancer pool member Returned: success Sample: |