Note
This plugin is part of the opentelekomcloud.cloud collection (version 0.0.1).
To install it use: ansible-galaxy collection install opentelekomcloud.cloud
.
To use it in a playbook, specify: opentelekomcloud.cloud.lb_listener
.
New in version 0.0.3: of opentelekomcloud.cloud
Add or Remove listener for Enhanced Load Balancer from the OTC load-balancer service(ELB).
The below requirements are needed on the host that executes this module.
openstacksdk
openstacksdk >= 0.36.0
otcextensions
python >= 3.6
Note
The standard OpenStack environment variables, such as OS_USERNAME
may be used instead of providing explicit values.
Auth information is driven by openstacksdk, which means that values can come from a yaml config file in /etc/ansible/openstack.yaml, /etc/openstack/clouds.yaml or ~/.config/openstack/clouds.yaml, then from standard environment variables, then finally by explicit parameters in plays. More information can be found at https://docs.openstack.org/openstacksdk/
# Create a lb listener.
- opentelekomcloud.cloud.lb_listener:
state: present
protocol_port: 80
protocol: TCP
loadbalancer: "0416b6f1-877f-4a51-987e-978b3f084253"
name: listener-test
admin_state_up: true
# Create a HTTPS lb listener.
- opentelekomcloud.cloud.lb_listener:
state: present
protocol_port: 443
protocol: terminated_https
default_tls_container_ref: "02dcd56799e045bf8b131533cc911dd6"
loadbalancer: "0416b6f1-877f-4a51-987e-978b3f084253"
name: listener-test
admin_state_up: true
# Create a HTTPS lb listener with the SNI feature.
- opentelekomcloud.cloud.lb_listener:
state: present
protocol_port: 443
protocol: terminated_https
default_tls_container_ref: "02dcd56799e045bf8b131533cc911dd6"
loadbalancer: "0416b6f1-877f-4a51-987e-978b3f084253"
name: listener-test
admin_state_up: true
sni_container_refs: ["e15d1b5000474adca383c3cd9ddc06d4", "5882325fd6dd4b95a88d33238d293a0f"]
# Delete a load balancer(and all its related resources)
- opentelekomcloud.cloud.lb_listener:
state: absent
name: listener-test
Common return values are documented here, the following are the fields unique to this module:
Anton Sidelnikov (@anton-sidelnikov)