mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
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.
This commit is contained in:
parent
4f8f95b58f
commit
6956596fd2
1 changed files with 2 additions and 2 deletions
|
|
@ -459,12 +459,12 @@ class AnsibleHCloudLoadBalancerService(AnsibleHCloud):
|
||||||
)
|
)
|
||||||
changed = True
|
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 = self.hcloud_load_balancer.update_service(LoadBalancerService(**params))
|
||||||
action.wait_until_finished()
|
action.wait_until_finished()
|
||||||
|
self._get_load_balancer()
|
||||||
except HCloudException as exception:
|
except HCloudException as exception:
|
||||||
self.fail_json_hcloud(exception)
|
self.fail_json_hcloud(exception)
|
||||||
self._get_load_balancer()
|
|
||||||
|
|
||||||
if changed:
|
if changed:
|
||||||
self._mark_as_changed()
|
self._mark_as_changed()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue