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:
parent
80d683959b
commit
a93dbaa428
2 changed files with 41 additions and 2 deletions
|
|
@ -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 }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue