ngine_io / ngine_io.cloudstack / 2.3.0 / module / cs_loadbalancer_rule Manages load balancer rules on Apache CloudStack based clouds. | "added in version" 0.1.0 of ngine_io.cloudstack" Authors: Darren Worrall (@dazworrall), René Moser (@resmo)ngine_io.cloudstack.cs_loadbalancer_rule (2.3.0) — module
Install with ansible-galaxy collection install ngine_io.cloudstack:==2.3.0
collections: - name: ngine_io.cloudstack version: 2.3.0
Add, update and remove load balancer rules.
- name: Create a load balancer rule ngine_io.cloudstack.cs_loadbalancer_rule: name: balance_http public_ip: 1.2.3.4 algorithm: leastconn public_port: 80 private_port: 8080
- name: Update algorithm of an existing load balancer rule ngine_io.cloudstack.cs_loadbalancer_rule: name: balance_http public_ip: 1.2.3.4 algorithm: roundrobin public_port: 80 private_port: 8080
- name: Delete a load balancer rule ngine_io.cloudstack.cs_loadbalancer_rule: name: balance_http public_ip: 1.2.3.4 state: absent
vpc: description: - Name of the VPC. type: str cidr: description: - CIDR (full notation) to be used for firewall rule if required. type: str name: description: - The name of the load balancer rule. required: true type: str tags: aliases: - tag description: - List of tags. Tags are a list of dictionaries having keys I(key) and I(value). - 'To delete all tags, set a empty list e.g. I(tags: []).' elements: dict type: list zone: description: - Name of the zone in which the rule should be created. - Required when the LB provider is ElasticLoadBalancerVm type: str state: choices: - present - absent default: present description: - State of the rule. type: str domain: description: - Domain the rule is related to. type: str account: description: - Account the rule is related to. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. required: true type: str network: description: - Name of the network. type: str project: description: - Name of the project the load balancer IP address is related to. type: str protocol: description: - The protocol to be used on the load balancer type: str algorithm: choices: - source - roundrobin - leastconn default: source description: - Load balancer algorithm - Required when using I(state=present). type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str ip_address: aliases: - public_ip description: - Public IP address from where the network traffic will be load balanced from. required: true type: str poll_async: default: true description: - Poll async jobs until job has finished. type: bool api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int description: description: - The description of the load balancer rule. type: str public_port: description: - The public port from where the network traffic will be load balanced from. - Required when using I(state=present). - Can not be changed once the rule exists due API limitation. type: int private_port: description: - The private port of the private ip address/virtual machine where the network traffic will be load balanced to. - Required when using I(state=present). - Can not be changed once the rule exists due API limitation. type: int open_firewall: default: false description: - Whether the firewall rule for public port should be created, while creating the new rule. - Use M(ngine_io.cloudstack.cs_firewall) for managing firewall rules. type: bool api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str
account: description: Account the rule is related to. returned: success sample: example account type: str algorithm: description: Load balancer algorithm used. returned: success sample: source type: str cidr: description: CIDR to forward traffic from. returned: success sample: 0.0.0.0/0 type: str description: description: Description of the rule. returned: success sample: http load balancer rule type: str domain: description: Domain the rule is related to. returned: success sample: example domain type: str id: description: UUID of the rule. returned: success sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f type: str name: description: Name of the rule. returned: success sample: http-lb type: str private_port: description: Private IP address. returned: success sample: 80 type: int project: description: Name of project the rule is related to. returned: success sample: Production type: str protocol: description: Protocol of the rule. returned: success sample: tcp type: str public_ip: description: Public IP address. returned: success sample: 1.2.3.4 type: str public_port: description: Public port. returned: success sample: 80 type: int state: description: State of the rule. returned: success sample: Add type: str tags: description: List of resource tags associated with the rule. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: list zone: description: Name of zone the rule is related to. returned: success sample: ch-gva-2 type: str