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

Start of hcloud_load_balancer_service

This commit is contained in:
Lukas Kämmerling 2020-06-29 09:04:55 +02:00
parent d2b567024f
commit 91c762c1cb

View file

@ -17,6 +17,7 @@
hcloud_load_balancer_service:
load_balancer: "{{hcloud_load_balancer_name}}"
protocol: "http"
listen_port: 80
state: present
register: result
check_mode: yes
@ -29,6 +30,7 @@
hcloud_load_balancer_service:
load_balancer: "{{hcloud_load_balancer_name}}"
protocol: "http"
listen_port: 80
state: present
register: load_balancer_service
- name: verify create load_balancer service
@ -42,9 +44,9 @@
- name: test create load_balancer service idempotency
hcloud_load_balancer_service:
type: "server"
load_balancer: "{{hcloud_load_balancer_name}}"
server: "{{hcloud_server_name}}"
protocol: "http"
listen_port: 80
state: present
register: load_balancer_service
- name: verify create load_balancer service idempotency
@ -54,9 +56,9 @@
- name: test absent load_balancer service
hcloud_load_balancer_service:
type: "server"
load_balancer: "{{hcloud_load_balancer_name}}"
server: "{{hcloud_server_name}}"
protocol: "http"
listen_port: 80
state: absent
register: result
- name: verify test absent load_balancer service
@ -73,13 +75,3 @@
assert:
that:
- result is success
- name: cleanup
hcloud_server:
name: "{{hcloud_server_name}}"
state: absent
register: result
- name: verify cleanup
assert:
that:
- result is success