mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
hcloud_load_balancer_service - fix imported wrong HealthCheck from hcloud-python
This commit is contained in:
parent
e16ae06ea3
commit
e2dfd884e4
2 changed files with 5 additions and 3 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- hcloud_load_balancer_service - fix imported wrong HealthCheck from hcloud-python (https://github.com/ansible-collections/hetzner.hcloud/pull/73).
|
||||
|
|
@ -289,7 +289,7 @@ from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hclou
|
|||
|
||||
try:
|
||||
from hcloud.load_balancers.domain import LoadBalancer, LoadBalancerService, LoadBalancerServiceHttp, \
|
||||
LoadBalancerServiceHealthCheck, LoadBalancerServiceHealthCheckHttp
|
||||
LoadBalancerHealthCheck, LoadBalancerHealtCheckHttp
|
||||
from hcloud import APIException
|
||||
except ImportError:
|
||||
APIException = None
|
||||
|
|
@ -414,7 +414,7 @@ class AnsibleHcloudLoadBalancerService(Hcloud):
|
|||
return service_http
|
||||
|
||||
def __get_service_health_checks(self, health_check):
|
||||
service_health_check = LoadBalancerServiceHealthCheck()
|
||||
service_health_check = LoadBalancerHealthCheck()
|
||||
if health_check.get("protocol") is not None:
|
||||
service_health_check.protocol = health_check.get("protocol")
|
||||
if health_check.get("port") is not None:
|
||||
|
|
@ -427,7 +427,7 @@ class AnsibleHcloudLoadBalancerService(Hcloud):
|
|||
service_health_check.retries = health_check.get("retries")
|
||||
if health_check.get("http") is not None:
|
||||
health_check_http = health_check.get("http")
|
||||
service_health_check.http = LoadBalancerServiceHealthCheckHttp()
|
||||
service_health_check.http = LoadBalancerHealtCheckHttp()
|
||||
if health_check_http.get("domain") is not None:
|
||||
service_health_check.http.domain = health_check_http.get("domain")
|
||||
if health_check_http.get("path") is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue