cloudscale_ch / cloudscale_ch.cloud / 2.3.1 / module / load_balancer_pool Manages load balancer pools on the cloudscale.ch IaaS service | "added in version" 2.3.0 of cloudscale_ch.cloud" Authors: Gaudenz Steinlin (@gaudenz), Kenneth Joss (@k-304)cloudscale_ch.cloud.load_balancer_pool (2.3.1) — module
Install with ansible-galaxy collection install cloudscale_ch.cloud:==2.3.1
collections: - name: cloudscale_ch.cloud version: 2.3.1
Get, create, update, delete pools on the cloudscale.ch IaaS service.
# Create a pool for a load balancer using registered variables - name: Create a running load balancer cloudscale_ch.cloud.load_balancer: name: 'lb1' flavor: 'lb-standard' zone: 'lpg1' tags: project: ansible-test stage: production sla: 24-7 api_token: xxxxxx register: load_balancer
- name: Create a load balancer pool cloudscale_ch.cloud.load_balancer_pool: name: 'swimming-pool' load_balancer: '{{ load_balancer.uuid }}' algorithm: 'round_robin' protocol: 'tcp' tags: project: ansible-test stage: production sla: 24-7 api_token: xxxxxx register: load_balancer_pool
# Create a load balancer pool with algorithm: round_robin and protocol: tcp - name: Create a load balancer pool cloudscale_ch.cloud.load_balancer_pool: name: 'cloudscale-loadbalancer-pool1' load_balancer: '3766c579-3012-4a85-8192-2bbb4ef85b5f' algorithm: 'round_robin' protocol: 'tcp' tags: project: ansible-test stage: production sla: 24-7 api_token: xxxxxx
# Get load balancer pool facts by name - name: Get facts of a load balancer pool cloudscale_ch.cloud.load_balancer_pool: name: cloudscale-loadbalancer-pool1 api_token: xxxxxx
name: description: - Name of the load balancer pool. type: str tags: description: - Tags assosiated with the load balancer. Set this to C({}) to clear any tags. type: dict uuid: description: - UUID of the load balancer pool. - Either I(name) or I(uuid) are required. type: str state: choices: - present - absent default: present description: - State of the load balancer pool. type: str api_url: default: https://api.cloudscale.ch/v1 description: - cloudscale.ch API URL. - This can also be passed in the C(CLOUDSCALE_API_URL) environment variable. type: str version_added: 1.3.0 version_added_collection: cloudscale_ch.cloud protocol: description: - The protocol used for traffic between the load balancer and the pool members. - See the [API documentation](https://www.cloudscale.ch/en/api/v1#pool-protocols) for supported protocols. type: str algorithm: description: - The algorithm according to which the incoming traffic is distributed between the pool members. - See the [API documentation](https://www.cloudscale.ch/en/api/v1#pool-algorithms) for supported distribution algorithms. type: str api_token: description: - cloudscale.ch API token. - This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment variable. required: true type: str api_timeout: default: 45 description: - Timeout in seconds for calls to the cloudscale.ch API. - This can also be passed in the C(CLOUDSCALE_API_TIMEOUT) environment variable. type: int load_balancer: description: - UUID of the load balancer for this pool. type: str
algorithm: description: The algorithm according to which the incoming traffic is distributed between the pool members returned: success sample: round_robin type: str created_at: description: The creation date and time of the load balancer pool returned: success when not state == absent sample: '2023-02-07T15:32:02.308041Z' type: str href: description: API URL to get details about this load balancer returned: success when not state == absent sample: https://api.cloudscale.ch/v1/load-balancers/pools/ type: str load_balancer: description: The load balancer this pool is connected to returned: success when not state == absent sample: href: https://api.cloudscale.ch/v1/load-balancers/15264769-ac69-4809-a8e4-4d73f8f92496 name: web-lb uuid: 15264769-ac69-4809-a8e4-4d73f8f92496 type: list name: description: The display name of the load balancer pool returned: success sample: web-lb-pool1 type: str protocol: description: The protocol used for traffic between the load balancer and the pool members returned: success sample: tcp type: str state: description: The current state of the load balancer pool returned: success sample: present type: str tags: description: Tags assosiated with the load balancer returned: success sample: project: my project type: dict uuid: description: The unique identifier for this load balancer pool returned: success sample: 3766c579-3012-4a85-8192-2bbb4ef85b5f type: str