Note
This plugin is part of the hetzner.hcloud collection.
To install it use: ansible-galaxy collection install hetzner.hcloud
.
To use it in a playbook, specify: hetzner.hcloud.hcloud_load_balancer
.
New in version 0.1.0: of hetzner.hcloud
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
api_token string / required | This is the API Token for the Hetzner Cloud. | |
delete_protection boolean |
| Protect the Load Balancer for deletion. |
disable_public_interface boolean |
| Disables the public interface. |
endpoint string | Default: "https://api.hetzner.cloud/v1" | This is the API Endpoint for the Hetzner Cloud. |
id integer | The ID of the Hetzner Cloud Load Balancer to manage. Only required if no Load Balancer name is given | |
labels dictionary | User-defined labels (key-value pairs). | |
load_balancer_type string | The Load Balancer Type of the Hetzner Cloud Load Balancer to manage. Required if Load Balancer does not exists. | |
location string | Location of Load Balancer. Required if no network_zone is given and Load Balancer does not exists. | |
name string | The Name of the Hetzner Cloud Load Balancer to manage. Only required if no Load Balancer id is given or a Load Balancer does not exists. | |
network_zone string | Network Zone of Load Balancer. Required of no location is given and Load Balancer does not exists. | |
state string |
| State of the Load Balancer. |
See also
Complete reference for the Hetzner Cloud API.
- name: Create a basic Load Balancer hcloud_load_balancer: name: my-Load Balancer load_balancer_type: lb11 location: fsn1 state: present - name: Ensure the Load Balancer is absent (remove if needed) hcloud_load_balancer: name: my-Load Balancer state: absent
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
hcloud_load_balancer complex | Always | The Load Balancer instance | |
delete_protection boolean | always | True if Load Balancer is protected for deletion | |
disable_public_interface boolean | always | True if Load Balancer public interface is disabled | |
id integer | always | Numeric identifier of the Load Balancer Sample: 1937415 | |
ipv4_address string | always | Public IPv4 address of the Load Balancer Sample: 116.203.104.109 | |
ipv6_address string | always | Public IPv6 address of the Load Balancer Sample: 2a01:4f8:1c1c:c140::1 | |
labels dictionary | always | User-defined labels (key-value pairs) | |
load_balancer_type string | always | Name of the Load Balancer type of the Load Balancer Sample: cx11 | |
location string | always | Name of the location of the Load Balancer Sample: fsn1 | |
name string | always | Name of the Load Balancer Sample: my-Load-Balancer | |
status string | always | Status of the Load Balancer Sample: running |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/hetzner/hcloud/hcloud_load_balancer_module.html