- Docs »
- hetzner.hcloud.hcloud_load_balancer – Create and manage cloud Load Balancers on the Hetzner Cloud.
-
You are reading the latest community version of the Ansible documentation. Red Hat subscribers, select 2.9 in the version selection to the left for the most recent Red Hat release.
hetzner.hcloud.hcloud_load_balancer – Create and manage cloud Load Balancers on the Hetzner Cloud.
Note
This plugin is part of the hetzner.hcloud collection (version 1.4.2).
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.
hcloud-python >= 1.0.0
hcloud-python >= 1.8.0
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
|
Choices:
- absent
present ←
|
State of the Load Balancer.
|
- 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
|