diff --git a/lib/ansible/module_utils/known_hosts.py b/lib/ansible/module_utils/known_hosts.py index 846965107f..34bc8bc7fd 100644 --- a/lib/ansible/module_utils/known_hosts.py +++ b/lib/ansible/module_utils/known_hosts.py @@ -18,7 +18,7 @@ def get_fqdn(repo_url): """ chop the hostname out of a giturl """ result = None - if "@" in repo_url: + if "@" in repo_url and not repo_url.startswith("http"): repo_url = repo_url.split("@", 1)[1] if ":" in repo_url: repo_url = repo_url.split(":")[0]