diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 962b868ee0..d56cc89395 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -377,6 +377,7 @@ def fetch_url(module, url, data=None, headers=None, method=None, netloc = netloc.split('@', 1)[1] if ':' in netloc: hostname, port = netloc.split(':', 1) + port = int(port) else: hostname = netloc port = 443