diff --git a/plugins/modules/host.py b/plugins/modules/host.py index cd6a9a5ac..a68dd4dc9 100644 --- a/plugins/modules/host.py +++ b/plugins/modules/host.py @@ -281,6 +281,9 @@ def run_module(): headers["If-Match"] = etag msg_tokens = [] + if current_folder.endswith("/"): + current_folder = current_folder.rstrip("/") + if current_folder != module.params["folder"]: move_host(module, base_url, headers) msg_tokens.append("Host was moved.")