community / community.general / 3.8.10 / module / clc_loadbalancer Create, Delete shared loadbalancers in CenturyLink Cloud. Authors: CLC Runner (@clc-runner)community.general.clc_loadbalancer (3.8.10) — module
Install with ansible-galaxy collection install community.general:==3.8.10
collections: - name: community.general version: 3.8.10
An Ansible module to Create, Delete shared loadbalancers in CenturyLink Cloud.
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Create Loadbalancer hosts: localhost connection: local tasks: - name: Actually Create things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.123 privatePort: 80 state: present
- name: Add node to an existing loadbalancer pool hosts: localhost connection: local tasks: - name: Actually Create things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.234 privatePort: 80 state: nodes_present
- name: Remove node from an existing loadbalancer pool hosts: localhost connection: local tasks: - name: Actually Create things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.234 privatePort: 80 state: nodes_absent
- name: Delete LoadbalancerPool hosts: localhost connection: local tasks: - name: Actually Delete things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.123 privatePort: 80 state: port_absent
- name: Delete Loadbalancer hosts: localhost connection: local tasks: - name: Actually Delete things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.123 privatePort: 80 state: absent
name: description: - The name of the loadbalancer required: true type: str port: choices: - '80' - '443' description: - Port to configure on the public-facing side of the load balancer pool type: str alias: description: - The alias of your CLC Account required: true type: str nodes: default: [] description: - A list of nodes that needs to be added to the load balancer pool elements: dict type: list state: choices: - present - absent - port_absent - nodes_present - nodes_absent default: present description: - Whether to create or delete the load balancer pool type: str method: choices: - leastConnection - roundRobin description: -The balancing method for the load balancer pool type: str status: choices: - enabled - disabled default: enabled description: - The status of the loadbalancer type: str location: description: - The location of the datacenter where the load balancer resides in required: true type: str description: description: - A description for the loadbalancer type: str persistence: choices: - standard - sticky description: - The persistence method for the load balancer type: str
loadbalancer: description: The load balancer result object from CLC returned: success sample: description: test-lb id: ab5b18cb81e94ab9925b61d1ca043fb5 ipAddress: 66.150.174.197 links: - href: /v2/sharedLoadBalancers/wfad/wa1/ab5b18cb81e94ab9925b61d1ca043fb5 rel: self verbs: - GET - PUT - DELETE - href: /v2/sharedLoadBalancers/wfad/wa1/ab5b18cb81e94ab9925b61d1ca043fb5/pools rel: pools verbs: - GET - POST name: test-lb pools: [] status: enabled type: dict