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

hcloud_load_balancer Allow changing the type of a Load Balancer (#21)

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
This commit is contained in:
Lukas Kämmerling 2020-08-10 09:58:30 +02:00 committed by GitHub
parent 19257f6d43
commit 9deba9db7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 0 deletions

View file

@ -60,6 +60,29 @@
that:
- result is not changed
- name: test change Load Balancer type
hcloud_load_balancer:
name: "{{ hcloud_load_balancer_name }}"
load_balancer_type: lb21
state: present
register: result_after_test
ignore_errors: true
- name: verify change Load Balancer type
assert:
that:
- result_after_test is changed
- result_after_test.hcloud_load_balancer.load_balancer_type == "lb21"
- name: test Load Balancer without type set to be idempotent
hcloud_load_balancer:
name: "{{hcloud_load_balancer_name}}"
register: result_after_test
- name: verify test Load Balancer without type set to be idempotent
assert:
that:
- result_after_test is not changed
- result_after_test.hcloud_load_balancer.load_balancer_type == "lb21"
- name: test update Load Balancer protection
hcloud_load_balancer:
name: "{{ hcloud_load_balancer_name }}"

View file

@ -1,2 +1,3 @@
cloud/hcloud
shippable/hcloud/group2
disabled