From 6956596fd2a4a570834fbfb42fb6194ed5271d59 Mon Sep 17 00:00:00 2001 From: "Jonas L." Date: Mon, 24 Feb 2025 14:26:58 +0100 Subject: [PATCH] fix: only update load balancer service when changed (#603) ##### SUMMARY We only was to perform an update call when a value changed, or we end up with an empty update request. --- plugins/modules/load_balancer_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/load_balancer_service.py b/plugins/modules/load_balancer_service.py index 1c69949..481bbba 100644 --- a/plugins/modules/load_balancer_service.py +++ b/plugins/modules/load_balancer_service.py @@ -459,12 +459,12 @@ class AnsibleHCloudLoadBalancerService(AnsibleHCloud): ) changed = True - if not self.module.check_mode: + if changed and not self.module.check_mode: action = self.hcloud_load_balancer.update_service(LoadBalancerService(**params)) action.wait_until_finished() + self._get_load_balancer() except HCloudException as exception: self.fail_json_hcloud(exception) - self._get_load_balancer() if changed: self._mark_as_changed()