gcore / gcore.cloud / 1.0.1 / module / loadbalancer_member Manages loadbalancer members. Authors: GCore (@GCore)gcore.cloud.loadbalancer_member (1.0.1) — module
Install with ansible-galaxy collection install gcore.cloud:==1.0.1
collections: - name: gcore.cloud version: 1.0.1
Create, delete loadbalancer members.
- name: Create new pool member gcore.cloud.loadbalancer_member: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create loadbalancer_pool_id: "{{ loadbalancer_pool_id }}" protocol_port: 80 address: '192.168.40.33'
- name: Delete pool member gcore.cloud.loadbalancer_member: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: delete loadbalancer_pool_id: "{{ loadbalancer_pool_id }}" loadbalancer_pool_member_id: "{{ loadbalancer_pool_member_id }}"
id: description: - Member ID must be provided if an existing member is being updated. - Used if I(command) is create required: false type: str weight: description: - Member weight. - Used if I(command) is create required: false type: int address: description: - Member IP address. - Required if I(command) is create. 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 - delete description: - Operation to perform. required: true type: str 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 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 subnet_id: description: - Either subnet_id or instance_id should be provided. - Required if I(command) is create and I(instance_id) is not passed required: false type: str 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 instance_id: description: - Either subnet_id or instance_id should be provided. - Required if I(command) is create and I(subnet_id) is not passed 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 monitor_port: description: - An alternate protocol port used for health monitoring a backend member. - Used if I(command) is create required: false type: int 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 protocol_port: description: - Member IP port. - Required if I(command) is create. required: false type: int admin_state_up: description: - true if enabled - Used if I(command) is create required: false type: bool monitor_address: description: - An alternate IP address used for health monitoring a backend member. - Used if I(command) is create required: false type: str operating_status: description: - Member operating status. - Used if I(command) is create required: false type: str loadbalancer_pool_id: description: - Loadbalancer pool ID. - Required if I(command) is create or delete. required: false type: str loadbalancer_pool_member_id: description: - Loadbalancer pool ID. - Required if I(command) is delete. required: false type: str
loadbalancer_member: 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: {} 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 then response will loadbalancer pool. - If I(command) is delete then response will be a dict of resource ID. returned: always type: complex