{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/18166","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/18166/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/18166/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/18166/events","html_url":"https://github.com/ansible/ansible/issues/18166","id":184892239,"number":18166,"title":"UNREACHABLE! => {\"changed\": false, \"msg\": \"Failed to connect to the host via ssh.\", \"unreachable\": true}","user":{"login":"tfendt","id":12413468,"avatar_url":"https://avatars.githubusercontent.com/u/12413468?v=3","gravatar_id":"","url":"https://api.github.com/users/tfendt","html_url":"https://github.com/tfendt","followers_url":"https://api.github.com/users/tfendt/followers","following_url":"https://api.github.com/users/tfendt/following{/other_user}","gists_url":"https://api.github.com/users/tfendt/gists{/gist_id}","starred_url":"https://api.github.com/users/tfendt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfendt/subscriptions","organizations_url":"https://api.github.com/users/tfendt/orgs","repos_url":"https://api.github.com/users/tfendt/repos","events_url":"https://api.github.com/users/tfendt/events{/privacy}","received_events_url":"https://api.github.com/users/tfendt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.1","name":"affects_2.1","color":"5319e7"},{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-24T16:37:01Z","updated_at":"2016-10-25T03:29:22Z","closed_at":null,"body":"<!---\r\nPlease do not report issues/requests related to Ansible modules here !!\r\n\r\nReport them to the appropriate modules-core or modules-extras project:\r\n  - https://github.com/ansible/ansible-modules-core/issues\r\n  - https://github.com/ansible/ansible-modules-extras/issues\r\n\r\nAlso verify first that your issue/request is not already reported in GitHub\r\n-->\r\n\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.2.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\nNo changes to default ansible.cfg\r\n\r\n##### OS / ENVIRONMENT\r\nUbuntu\r\n\r\nDirectory Structure:\r\n```\r\ndevops\r\n  ansible\r\n    farscape\r\n      group_vars\r\n        all\r\n        qa\r\n        qa-ui\r\n      inventories\r\n        ec2.ini\r\n        ec2.py\r\n        qa\r\n\r\nsecurity\r\n  keys\r\n    platform\r\n      qa\r\n        key.pem\r\n\r\nqa-ui\r\n  ansible\r\n    site.yml\r\n    roles\r\n      qa-ui\r\n```\r\n##### SUMMARY\r\nAnsible can't connect to host after upgrading from 2.1.0.0 to 2.1.2.0.\r\n\r\n##### STEPS TO REPRODUCE\r\n```\r\nsite.yml:\r\n\r\n- name: Test Ping\r\n  hosts: \"{{ hosts }}\"\r\n  gather_facts: no\r\n  tags: test\r\n  tasks:\r\n    - name: Test Ping\r\n      ping:\r\n\r\nqa group var file:\r\n\r\nansible_ssh_user: ubuntu\r\nansible_ssh_private_key_file: ../../../security/keys/platform/qa/key.pem\r\n\r\n\r\nExecuted from the devops -> ansible -> farscape directory (see directory structure above):\r\n\r\nansible-playbook -i inventories/ ../../../qa-ui/ansible/site.yml -t test -e \"hosts=qa-ui\"\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nSuccessful connection and ping result.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nUsing /etc/ansible/ansible.cfg as config file\r\nLoaded callback default of type stdout, v2.0\r\n\r\nPLAYBOOK: site.yml *************************************************\r\n2 plays in ../../../qa-ui/ansible/site.yml\r\n\r\nPLAY [Test Ping] ***************************************************************\r\n\r\nTASK [Test Ping] ***************************************************************\r\ntask path: /opt/teamcity-agent/work/56ef8995252d7315/qa-ui/ansible/site.yml:6\r\n<10.2.10.13> ESTABLISH SSH CONNECTION FOR USER: None\r\n<10.2.10.12> ESTABLISH SSH CONNECTION FOR USER: None\r\n<10.2.10.13> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r 10.2.10.13 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-100845165082436 `\" && echo ansible-tmp-1477325466.67-100845165082436=\"` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-100845165082436 `\" ) && sleep 0'\"'\"''\r\n<10.2.10.12> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r 10.2.10.12 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-37577927945882 `\" && echo ansible-tmp-1477325466.67-37577927945882=\"` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-37577927945882 `\" ) && sleep 0'\"'\"''\r\nfatal: [10.2.10.13]: UNREACHABLE! => {\"changed\": false, \"msg\": \"Failed to connect to the host via ssh.\", \"unreachable\": true}\r\nfatal: [10.2.10.12]: UNREACHABLE! => {\"changed\": false, \"msg\": \"Failed to connect to the host via ssh.\", \"unreachable\": true}\r\n\r\n\r\nPLAY RECAP *********************************************************************\r\n10.2.10.12                 : ok=0    changed=0    unreachable=1    failed=0   \r\n10.2.10.13                 : ok=0    changed=0    unreachable=1    failed=0 \r\n```\r\n\r\nThis error happens across all our ansible tasks after upgrading from 2.1.0.0 to 2.1.2.0."},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/255926755","html_url":"https://github.com/ansible/ansible/issues/18166#issuecomment-255926755","issue_url":"https://api.github.com/repos/ansible/ansible/issues/18166","id":255926755,"user":{"login":"kuenishi","id":11440,"avatar_url":"https://avatars.githubusercontent.com/u/11440?v=3","gravatar_id":"","url":"https://api.github.com/users/kuenishi","html_url":"https://github.com/kuenishi","followers_url":"https://api.github.com/users/kuenishi/followers","following_url":"https://api.github.com/users/kuenishi/following{/other_user}","gists_url":"https://api.github.com/users/kuenishi/gists{/gist_id}","starred_url":"https://api.github.com/users/kuenishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuenishi/subscriptions","organizations_url":"https://api.github.com/users/kuenishi/orgs","repos_url":"https://api.github.com/users/kuenishi/repos","events_url":"https://api.github.com/users/kuenishi/events{/privacy}","received_events_url":"https://api.github.com/users/kuenishi/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T03:29:21Z","updated_at":"2016-10-25T03:29:21Z","body":"For me (macOS 10.11.6, Python 2.7.12, OpenSSH_7.2p2, LibreSSL 2.4.1), adding `-c ssh --ask-pass -u <remote-user-name>` explicitly, with `sshpass` installed solved the issue. IMO this is related to the behavior of smart connector, described in [the official document](http://docs.ansible.com/ansible/intro_configuration.html#transport) like this:\r\n\r\n> This is the default transport to use if “-c <transport_name>” is not specified to /usr/bin/ansible or /usr/bin/ansible-playbook. The default is ‘smart’, which will use ‘ssh’ (OpenSSH based) if the local operating system is new enough to support ControlPersist technology, and then will otherwise use ‘paramiko’. \r\n\r\nBut this behavior is quite different from choosing explicitly `-c ssh` or `-c paramiko`, and hard to find out workaround like adding `--ask-pass` or `-u <username>`. I'd like these message to be more close to resolution."}}
{"actor":{"display_login":"kuenishi"}}