{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/20500","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/20500/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/20500/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/20500/events","html_url":"https://github.com/ansible/ansible/issues/20500","id":202129201,"number":20500,"title":"known_hosts failing on subsequent runs \"ssh-keygen failed to hash host\"","user":{"login":"danbohea","id":6885065,"avatar_url":"https://avatars.githubusercontent.com/u/6885065?v=3","gravatar_id":"","url":"https://api.github.com/users/danbohea","html_url":"https://github.com/danbohea","followers_url":"https://api.github.com/users/danbohea/followers","following_url":"https://api.github.com/users/danbohea/following{/other_user}","gists_url":"https://api.github.com/users/danbohea/gists{/gist_id}","starred_url":"https://api.github.com/users/danbohea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbohea/subscriptions","organizations_url":"https://api.github.com/users/danbohea/orgs","repos_url":"https://api.github.com/users/danbohea/repos","events_url":"https://api.github.com/users/danbohea/events{/privacy}","received_events_url":"https://api.github.com/users/danbohea/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":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-20T12:29:30Z","updated_at":"2017-01-30T19:04:58Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nknown_hosts\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.3.0\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nmacOS (Mac OS X)\r\n\r\n##### SUMMARY\r\nSubsequent runs of known_hosts fail with \"ssh-keygen failed to hash host\". The same code works fine in Ansible 2.2 and lower.\r\n\r\n##### STEPS TO REPRODUCE\r\nRun the following twice in the same play:\r\n```yaml\r\n- name: Add github to known_hosts\r\n  known_hosts:\r\n    path: /Users/{{ ansible_env.USER }}/.ssh/known_hosts\r\n    name: \"github.com\"\r\n    key: \"github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\"\r\n```\r\n\r\nHere's the failed Travis CI build that prompted me to raise this issue: https://travis-ci.org/danbohea/macsible/jobs/193471258\r\n\r\n\r\n##### EXPECTED RESULTS\r\nSubsequent runs should just return \"OK\" as the value doesn't need to be changed.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nfailed: [localhost] (item={u'host': u'github.com', u'key': u'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='}) => {\"failed\": true, \"item\": {\"host\": \"github.com\", \"key\": \"github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\"}, \"msg\": \"ssh-keygen failed to hash host (rc=1,stdout='|1|/GfvmadSEUS8+g1S/sne3MqCcng=|MNk8u3xkMh1sMBj+G0D5HNlf2LI= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\\n',stderr='')\"}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/276157630","html_url":"https://github.com/ansible/ansible/issues/20500#issuecomment-276157630","issue_url":"https://api.github.com/repos/ansible/ansible/issues/20500","id":276157630,"user":{"login":"danbohea","id":6885065,"avatar_url":"https://avatars.githubusercontent.com/u/6885065?v=3","gravatar_id":"","url":"https://api.github.com/users/danbohea","html_url":"https://github.com/danbohea","followers_url":"https://api.github.com/users/danbohea/followers","following_url":"https://api.github.com/users/danbohea/following{/other_user}","gists_url":"https://api.github.com/users/danbohea/gists{/gist_id}","starred_url":"https://api.github.com/users/danbohea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbohea/subscriptions","organizations_url":"https://api.github.com/users/danbohea/orgs","repos_url":"https://api.github.com/users/danbohea/repos","events_url":"https://api.github.com/users/danbohea/events{/privacy}","received_events_url":"https://api.github.com/users/danbohea/received_events","type":"User","site_admin":false},"created_at":"2017-01-30T19:04:58Z","updated_at":"2017-01-30T19:04:58Z","body":"@mgedmin Failed again: https://travis-ci.org/danbohea/macsible/jobs/196672627"}}
{"actor":{"display_login":"danbohea"}}