{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/13526","labels_url":"https://api.github.com/repos/ansible/ansible/issues/13526/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/13526/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/13526/events","html_url":"https://github.com/ansible/ansible/issues/13526","id":121859438,"number":13526,"title":"Failed to connect to windows host at handlers section","user":{"login":"ynaka81","id":13902735,"avatar_url":"https://avatars.githubusercontent.com/u/13902735?v=3","gravatar_id":"","url":"https://api.github.com/users/ynaka81","html_url":"https://github.com/ynaka81","followers_url":"https://api.github.com/users/ynaka81/followers","following_url":"https://api.github.com/users/ynaka81/following{/other_user}","gists_url":"https://api.github.com/users/ynaka81/gists{/gist_id}","starred_url":"https://api.github.com/users/ynaka81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynaka81/subscriptions","organizations_url":"https://api.github.com/users/ynaka81/orgs","repos_url":"https://api.github.com/users/ynaka81/repos","events_url":"https://api.github.com/users/ynaka81/events{/privacy}","received_events_url":"https://api.github.com/users/ynaka81/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"nitzmahone","id":6775756,"avatar_url":"https://avatars.githubusercontent.com/u/6775756?v=3","gravatar_id":"","url":"https://api.github.com/users/nitzmahone","html_url":"https://github.com/nitzmahone","followers_url":"https://api.github.com/users/nitzmahone/followers","following_url":"https://api.github.com/users/nitzmahone/following{/other_user}","gists_url":"https://api.github.com/users/nitzmahone/gists{/gist_id}","starred_url":"https://api.github.com/users/nitzmahone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitzmahone/subscriptions","organizations_url":"https://api.github.com/users/nitzmahone/orgs","repos_url":"https://api.github.com/users/nitzmahone/repos","events_url":"https://api.github.com/users/nitzmahone/events{/privacy}","received_events_url":"https://api.github.com/users/nitzmahone/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/5","html_url":"https://github.com/ansible/ansible/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/5/labels","id":975800,"number":5,"title":"v2","description":null,"creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":607,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-12-16T06:50:22Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-12-12T14:31:59Z","updated_at":"2015-12-16T06:50:22Z","closed_at":"2015-12-16T06:50:22Z","body":"##### Issue Type:\r\nBug Report\r\n\r\n##### Ansible Version:\r\n```\r\n$ ansible --version\r\nansible 2.1.0 (devel 14f3739260)\r\n```\r\n\r\n##### Environment:\r\nubuntu 14.04\r\n\r\n##### Summary:\r\nFailed to connect windows host at handlers section.\r\nThe connection at handlers section seems to be ssh, although the target host is windows.\r\n\r\n##### Steps To Reproduce:\r\nThe playbook is below.\r\n```\r\n---\r\n- hosts: windows\r\n  remote_user: vagrant\r\n  handlers:\r\n          - name: handlers test\r\n            win_ping:\r\n  tasks:\r\n          - name: ping\r\n            win_ping:\r\n            changed_when: True\r\n            notify: handlers test\r\n```\r\nand the inventory is,\r\n```\r\n[windows]\r\n192.168.33.100\r\n  \r\n[windows:vars]\r\nansible_user=vagrant\r\nansible_password=vagrant\r\nansible_port=5986\r\nansible_connection=winrm\r\n```\r\n\r\n##### Actual Results:\r\n```\r\nPLAY ***************************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [192.168.33.100]\r\n\r\nTASK [ping] ********************************************************************\r\nchanged: [192.168.33.100]\r\n\r\nRUNNING HANDLER [handlers test] ************************************************\r\nfatal: [192.168.33.100]: UNREACHABLE! => {\"changed\": false, \"msg\": \"ERROR! SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue\", \"unreachable\": true}\r\n\r\nPLAY RECAP *********************************************************************\r\n192.168.33.100             : ok=2    changed=1    unreachable=1    failed=0\r\n```\r\nwith debug option,\r\n```\r\nRUNNING HANDLER [handlers test] ************************************************\r\n<192.168.33.100> ESTABLISH SSH CONNECTION FOR USER: vagrant\r\n<192.168.33.100> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/nakagawa/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.33.100 '( umask 22 && mkdir -p \"$( echo $HOME/.ansible/tmp/ansible-tmp-1449930524.88-211750385473219 )\" && echo \"$( echo $HOME/.ansible/tmp/ansible-tmp-1449930524.88-211750385473219 )\" )'\r\nfatal: [192.168.33.100]: UNREACHABLE! => {\"changed\": false, \"msg\": \"ERROR! SSH encountered an unknown error. The output was:\\nOpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\\r\\ndebug1: Reading configuration data /etc/ssh/ssh_config\\r\\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\\r\\ndebug1: auto-mux: Trying existing master\\r\\ndebug1: Control socket \\\"/home/nakagawa/.ansible/cp/ansible-ssh-192.168.33.100-22-vagrant\\\" does not exist\\r\\ndebug2: ssh_connect: needpriv 0\\r\\ndebug1: Connecting to 192.168.33.100 [192.168.33.100] port 22.\\r\\ndebug2: fd 3 setting O_NONBLOCK\\r\\ndebug1: connect to address 192.168.33.100 port 22: Connection timed out\\r\\nssh: connect to host 192.168.33.100 port 22: Connection timed out\\r\\n\", \"unreachable\": true}\r\n```"}}