mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
always mark as changed
This commit is contained in:
parent
a149e1ee43
commit
e5e36a11c1
1 changed files with 3 additions and 1 deletions
|
|
@ -274,6 +274,7 @@ class AnsibleHcloudLoadBalancerService(Hcloud):
|
|||
return service_health_check
|
||||
|
||||
def _update_load_balancer_service(self):
|
||||
old_service = self.hcloud_load_balancer_service
|
||||
try:
|
||||
params = {
|
||||
"listen_port": self.module.params.get("listen_port"),
|
||||
|
|
@ -298,10 +299,11 @@ class AnsibleHcloudLoadBalancerService(Hcloud):
|
|||
if not self.module.check_mode:
|
||||
self.hcloud_load_balancer.update_service(LoadBalancerService(**params)).wait_until_finished(
|
||||
max_retries=1000)
|
||||
self._mark_as_changed()
|
||||
except APIException as e:
|
||||
self.module.fail_json(msg=e.message)
|
||||
self._get_load_balancer()
|
||||
if old_service.__dict__ != self.hcloud_load_balancer_service.__dict__:
|
||||
self._mark_as_changed()
|
||||
|
||||
def _get_load_balancer_service(self):
|
||||
for service in self.hcloud_load_balancer.services:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue