diff --git a/lib/ansible/module_utils/known_hosts.py b/lib/ansible/module_utils/known_hosts.py index 121dc2e5ab4..3406e2c7da0 100644 --- a/lib/ansible/module_utils/known_hosts.py +++ b/lib/ansible/module_utils/known_hosts.py @@ -74,6 +74,8 @@ def get_fqdn(repo_url): return None if parts[1] != '': result = parts[1] + if ":" in result: + result = result.split(":")[0] if "@" in result: result = result.split("@", 1)[1]