1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

feat: add load_balancer algorithm option (#368)

##### SUMMARY

Allow to configure load balancers algorithm.

Closes #289

Depends on #367 

##### ISSUE TYPE

- Feature Pull Request


##### COMPONENT NAME
hcloud_load_balancer
This commit is contained in:
Jonas L 2023-10-20 12:20:09 +02:00 committed by GitHub
parent 80d683959b
commit a93dbaa428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 2 deletions

View file

@ -42,6 +42,7 @@
- result is changed
- result.hcloud_load_balancer.name == "{{ hcloud_load_balancer_name }}"
- result.hcloud_load_balancer.load_balancer_type == "lb11"
- result.hcloud_load_balancer.algorithm == "round_robin"
- result.hcloud_load_balancer.labels.key == "value"
- result.hcloud_load_balancer.labels.label == "value123"
- result.hcloud_load_balancer.delete_protection == false
@ -58,6 +59,18 @@
that:
- result is not changed
- name: Test update algorithm
hetzner.hcloud.hcloud_load_balancer:
name: "{{ hcloud_load_balancer_name }}"
algorithm: least_connections
state: present
register: result
- name: Verify update algorithm
ansible.builtin.assert:
that:
- result is changed
- result.hcloud_load_balancer.algorithm == "least_connections"
- name: Test update load_balancer_type
hetzner.hcloud.hcloud_load_balancer:
name: "{{ hcloud_load_balancer_name }}"