hcloud_server: streamline label handling (#53633)

This commit is contained in:
Lukas Kämmerling 2019-03-11 16:57:23 +01:00 committed by René Moser
commit 32c337ee39
2 changed files with 19 additions and 1 deletions

View file

@ -274,7 +274,7 @@ class AnsibleHcloudServer(Hcloud):
self._mark_as_changed()
labels = self.module.params.get("labels")
if labels is not None:
if labels is not None and labels != self.hcloud_server.labels:
if not self.module.check_mode:
self.hcloud_server.update(labels=labels)
self._mark_as_changed()