gcore / gcore.cloud / 1.0.1 / module / loadbalancer_pool Manages loadbalancer pools. Authors: GCore (@GCore)gcore.cloud.loadbalancer_pool (1.0.1) — module
Install with ansible-galaxy collection install gcore.cloud:==1.0.1
collections: - name: gcore.cloud version: 1.0.1
Create, update, delete loadbalancer pools.
- name: Create new pool for specific loadbalancer gcore.cloud.loadbalancer_pool: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create name: "test_lb_pool" lb_algorithm: "{{ lb_algorithm }}" protocol: "{{ protocol }}" loadbalancer_id: "{{ loadbalancer_id }}"
- name: Create new pool for specific loadbalancer listener gcore.cloud.loadbalancer_pool: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create name: "test_lb_pool" lb_algorithm: "{{ lb_algorithm }}" protocol: "{{ protocol }}" loadbalancer_id: "{{ loadbalancer_id }}" listener_id: "{{ listener_id }}"
- name: Update pool gcore.cloud.loadbalancer_pool: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: update loadbalancer_pool_id: "{{ loadbalancer_pool_id }}" name: "test_lb_pool_2" timeout_client_data: "{{ timeout_client_data }}" lb_algorithm: "{{ lb_algorithm }}"
- name: Delete pool gcore.cloud.loadbalancer_pool: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: delete loadbalancer_pool_id: "{{ loadbalancer_pool_id }}"
name: description: - Load balancer pool name. - Required if I(command) is create. - Used if I(command) is update. required: false type: str api_key: description: - GCore API auth key - Can be passed as I(CLOUD_API_KEY) environment variable. type: str command: choices: - create - update - delete description: - Operation to perform. required: true type: str members: description: - Pool members. - Used if I(command) is create or update elements: dict required: false type: list api_host: default: https://api.gcore.com/cloud description: - GCore API base host - Can be passed as I(CLOUD_API_HOST) environment variable. type: str protocol: choices: - HTTP - HTTPS - PROXY - TCP - UDP description: - Protocol. - Used if I(command) is create or update required: false type: str region_id: description: - GCore API region ID - Required if I(region_name) is not passed - Can be passed as I(CLOUD_REGION_ID) environment variable. type: int project_id: description: - GCore API project ID - Required if I(project_name) is not passed - Can be passed as I(CLOUD_PROJECT_ID) environment variable. type: int api_timeout: default: 30 description: - Timeout in seconds to polling GCore API type: int listener_id: description: - Listener ID. - Required if I(command) is create and I(loadbalancer_id) is not passed - Used if I(command) is update required: false type: str region_name: description: - GCore API region name - Required if I(region_id) is not passed - Can be passed as I(CLOUD_REGION_NAME) environment variable. type: str lb_algorithm: choices: - ROUND_ROBIN - LEAST_CONNECTIONS - SOURCE_IP - SOURCE_IP_PORT description: - Load balancer algorithm. - Required if I(command) is create. - Used if I(command) is update. required: false type: str project_name: description: - GCore API project name - Required if I(project_id) is not passed - Can be passed as I(CLOUD_PROJECT_NAME) environment variable. type: str healthmonitor: description: - Health monitor details. - Used if I(command) is create or update required: false type: dict loadbalancer_id: description: - Loadbalancer ID. - Required if I(command) is create and I(listener_id) is not passed - Used if I(command) is update required: false type: str session_persistence: description: - Session persistence details. - Used if I(command) is create or update required: false type: dict timeout_client_data: description: - Frontend client inactivity timeout in milliseconds. - Used if I(command) is create or update required: false type: int timeout_member_data: description: - Backend member inactivity timeout in milliseconds. - Used if I(command) is create or update required: false type: int loadbalancer_pool_id: description: - Loadbalancer pool ID. - Required if I(command) is update or delete. required: false type: str timeout_member_connect: description: - Backend member connection timeout in milliseconds. - Used if I(command) is create or update required: false type: int
loadbalancer_pool: contains: creator_task_id: description: Active task. If None, action has been performed immediately in the request itself returned: if available sample: d8334c12-2881-4c4a-84ad-1b21fea73ad1 type: str healthmonitor: description: Health monitor parameters returned: always sample: delay: 10 http_method: GET max_retries: 3 max_retries_down: 3 timeout: 5 type: HTTP url_path: / type: dict id: description: Pool ID returned: always sample: 43658ea9-54bd-4807-90b1-925921c9a0d1 type: str lb_algorithm: description: Load balancer algorithm returned: always sample: ROUND_ROBIN type: str listeners: description: - Listeners IDs elements: dict returned: always sample: - id: c63341da-ea44-4027-bbf6-1f1939c783da type: list loadbalancers: description: Load balancers IDs elements: dict returned: always sample: - id: 79943b39-5e67-47e1-8878-85044b39667a type: list members: description: Number of pools elements: dict returned: always sample: - address: 192.168.13.9 id: 65f4e0eb-7846-490e-b44d-726c8baf3c25 operating_status: ONLINE protocol_port: 80 subnet_id: c864873b-8d9b-4d29-8cce-bf0bdfdaa74d weight: 1 type: list name: description: Pool name returned: always sample: lbaas_test_pool type: str operating_status: description: Pool operating status returned: always sample: ONLINE type: str protocol: description: Protocol returned: always sample: TCP type: str provisioning_status: description: Pool lifecycle status returned: always sample: ACTIVE type: str session_persistence: description: Session persistence parameters returned: always sample: cookie_name: test persistence_granularity: null persistence_timeout: null type: APP_COOKIE type: dict timeout_client_data: description: Frontend client inactivity timeout in milliseconds returned: always sample: 50000 type: int timeout_member_connect: description: - Backend member connection timeout in milliseconds. returned: always sample: 5000 type: int timeout_member_data: description: Backend member inactivity timeout in milliseconds returned: always sample: null type: int description: - Response depends of I(command). - If I(command) is create or update then response will be a dict of resource. - If I(command) is delete then response will be a dict of resource ID. returned: always type: complex