{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/17999","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/17999/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17999/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/17999/events","html_url":"https://github.com/ansible/ansible/pull/17999","id":182769661,"number":17999,"title":"SSL ipv6 support for certificate handler in urls.py","user":{"login":"sorenk","id":6883851,"avatar_url":"https://avatars3.githubusercontent.com/u/6883851?v=4","gravatar_id":"","url":"https://api.github.com/users/sorenk","html_url":"https://github.com/sorenk","followers_url":"https://api.github.com/users/sorenk/followers","following_url":"https://api.github.com/users/sorenk/following{/other_user}","gists_url":"https://api.github.com/users/sorenk/gists{/gist_id}","starred_url":"https://api.github.com/users/sorenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorenk/subscriptions","organizations_url":"https://api.github.com/users/sorenk/orgs","repos_url":"https://api.github.com/users/sorenk/repos","events_url":"https://api.github.com/users/sorenk/events{/privacy}","received_events_url":"https://api.github.com/users/sorenk/received_events","type":"User","site_admin":false},"labels":[{"id":454885231,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":48276098,"url":"https://api.github.com/repos/ansible/ansible/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270","default":false},{"id":499635167,"url":"https://api.github.com/repos/ansible/ansible/labels/c:module_utils/","name":"c:module_utils/","color":"b60205","default":false},{"id":512406029,"url":"https://api.github.com/repos/ansible/ansible/labels/c:module_utils/urls","name":"c:module_utils/urls","color":"b60205","default":false},{"id":512427836,"url":"https://api.github.com/repos/ansible/ansible/labels/module_util","name":"module_util","color":"ededed","default":false},{"id":61436281,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_revision","name":"needs_revision","color":"eb6450","default":false},{"id":581543918,"url":"https://api.github.com/repos/ansible/ansible/labels/stale_ci","name":"stale_ci","color":"fef2c0","default":false},{"id":636352796,"url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-13T11:56:56Z","updated_at":"2017-10-04T09:06:45Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/17999","html_url":"https://github.com/ansible/ansible/pull/17999","diff_url":"https://github.com/ansible/ansible/pull/17999.diff","patch_url":"https://github.com/ansible/ansible/pull/17999.patch"},"body":"##### ISSUE TYPE\n- Bugfix Pull Request\n##### COMPONENT NAME\n\nurls.py\n##### ANSIBLE VERSION\n\n```\nansible 2.1.0.0\n```\n##### SUMMARY\n\nget_url on a ipv6 machine currently fails towards ipv6 web server on SSL with \n\"Failed to validate the SSL certificate for hostname:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible\" \n\nThe error message is totally misleading, but after some debugging i figured out that it is caused by the certificate handler which can't establish a ipv6 connection. \n\nThis is fixed by using socket.create_connection (figures out ipv4/ipv6 automatically) instead of socket.socket. \n\nBefore:\n\n```\nTASK [myrole : Install jdk using https] *************************\nThursday 13 October 2016  13:34:15 +0200 (0:00:00.160)       0:06:21.364 ****** \nfailed: [server.domain.dk] (item={u'jce': True, u'version': u'1.8.0_45', u'name': u'jdk-8u45-linux-x64.tar.gz'}) => {\"failed\": true, \"item\": {\"jce\": true, \"name\": \"jdk-8u45-linux-x64.tar.gz\", \"version\": \"1.8.0_45\"}, \"msg\": \"Failed to validate the SSL certificate for myreposerver.domain:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible\"}\n```\n\nAfter:\n\n```\nTASK [myrole : Install jdk using https] *************************\nThursday 13 October 2016  13:49:03 +0200 (0:00:00.234)       0:06:16.652 ****** \nok: [server.domain.dk] => (item={u'jce': True, u'version': u'1.8.0_45', u'name': u'jdk-8u45-linux-x64.tar.gz'})\n```\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/334094835","html_url":"https://github.com/ansible/ansible/pull/17999#issuecomment-334094835","issue_url":"https://api.github.com/repos/ansible/ansible/issues/17999","id":334094835,"user":{"login":"sorenk","id":6883851,"avatar_url":"https://avatars3.githubusercontent.com/u/6883851?v=4","gravatar_id":"","url":"https://api.github.com/users/sorenk","html_url":"https://github.com/sorenk","followers_url":"https://api.github.com/users/sorenk/followers","following_url":"https://api.github.com/users/sorenk/following{/other_user}","gists_url":"https://api.github.com/users/sorenk/gists{/gist_id}","starred_url":"https://api.github.com/users/sorenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorenk/subscriptions","organizations_url":"https://api.github.com/users/sorenk/orgs","repos_url":"https://api.github.com/users/sorenk/repos","events_url":"https://api.github.com/users/sorenk/events{/privacy}","received_events_url":"https://api.github.com/users/sorenk/received_events","type":"User","site_admin":false},"created_at":"2017-10-04T09:06:45Z","updated_at":"2017-10-04T09:06:45Z","author_association":"CONTRIBUTOR","body":"@mattclay  since 2.4 already has been release in the meantime ... could we just apply this patch for 2.4 then?"}}
{"actor":{"display_login":"sorenk"}}