hetzner.hcloud.load_balancer_status filter – Compute the status of a Load Balancer

Note

This filter plugin is part of the hetzner.hcloud collection (version 4.2.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install hetzner.hcloud.

To use it in a playbook, specify: hetzner.hcloud.load_balancer_status.

New in hetzner.hcloud 4.2.0

Synopsis

  • Compute the status of a Load Balancer based on its targets.

Input

This describes the input of the filter, the value before | hetzner.hcloud.load_balancer_status.

Parameter

Comments

Input

dictionary / required

Load Balancer data.

Examples

# Ensure a load balancer is healthy
{{ result.hcloud_load_balancer_info[0] | hetzner.hcloud.load_balancer_status == "healthy" }}

Return Value

Key

Description

Return value

string

The status of the Load Balancer targets, can be one of unknown, unhealthy or healthy.

Returned: success

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.