{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16025","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16025/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16025/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16025/events","html_url":"https://github.com/ansible/ansible/issues/16025","id":157178153,"number":16025,"title":"Delegated host_vars not loaded","user":{"login":"aperigault","id":5754674,"avatar_url":"https://avatars.githubusercontent.com/u/5754674?v=3","gravatar_id":"","url":"https://api.github.com/users/aperigault","html_url":"https://github.com/aperigault","followers_url":"https://api.github.com/users/aperigault/followers","following_url":"https://api.github.com/users/aperigault/following{/other_user}","gists_url":"https://api.github.com/users/aperigault/gists{/gist_id}","starred_url":"https://api.github.com/users/aperigault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperigault/subscriptions","organizations_url":"https://api.github.com/users/aperigault/orgs","repos_url":"https://api.github.com/users/aperigault/repos","events_url":"https://api.github.com/users/aperigault/events{/privacy}","received_events_url":"https://api.github.com/users/aperigault/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/windows","name":"windows","color":"777777"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-27T10:36:14Z","updated_at":"2016-06-03T12:00:27Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\n```\r\n2.1.0.0\r\n```\r\n\r\n##### CONFIGURATION\r\nhash_behaviour = merge\r\n\r\n##### OS / ENVIRONMENT\r\nUbuntu 14.04.1\r\n\r\n##### SUMMARY\r\nIf my delegated host not match limit delegated host_vars are not loaded.\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n```\r\n---\r\n- hosts: webserver\r\n  tasks:\r\n    - raw: echo toto\r\n      delegate_to: windows_server\r\n```\r\nhost_vars/windows_server\r\n```\r\nansible_connection: winrm\r\nansible_password: password\r\nansible_user: user\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n```\r\nansible-playbook -u user --limit=webserver:windows_server -k test.yml\r\n\r\nPLAYBOOK: test.yml ********************************************************* \r\n1 plays in test.yml PLAY [echo toto ****************************************** \r\nTASK [setup] *******************************************************************\r\nok: [webserver]\r\nTASK [echo toto] ******************************************************\r\nok: [webserver-> windows_server] => {\"changed\": false, \"invocation\": {\"module_args\": {\"_raw_params\": \"echo toto\"}, \"module_name\": \"raw\"}, \"rc\": 0, \"stderr\": \"#< CLIXML\\r\\n<Objs Version=\\\"1.1.0.1\\\" xmlns=\\\"http://schemas.microsoft.com/powershell/2004/04\\\"><Obj S=\\\"progress\\\" RefId=\\\"0\\\"><TN RefId=\\\"0\\\"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N=\\\"SourceId\\\">1</I64><PR N=\\\"Record\\\"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>\", \"stdout\": \"toto\\r\\n\", \"stdout_lines\": [\"toto\"]} \r\n\r\nPLAY RECAP *********************************************************************\r\nwebserver : ok=2 changed=0 unreachable=0 failed=0 \r\n```\r\n\r\n##### ACTUAL RESULTS\r\n\r\n```\r\nansible-playbook -u user --limit=webserver -k test.yml\r\n\r\nPLAYBOOK: test.yml ********************************************************* \r\n1 plays in test.yml PLAY [echo toto ****************************************** \r\nTASK [setup] *******************************************************************\r\nok: [webserver]\r\nTASK [echo toto] ******************************************************\r\ntask path: /path/toto.yml:4 <windows_server> ESTABLISH SSH CONNECTION FOR USER: user <windows_server> SSH: ansible.cfg set ssh_args: (-o)(ServerAliveCountMax=10)(-o)(ServerAliveInterval=30) <windows_server> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no) <windows_server> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=user) <windows_server> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=20) <windows_server> SSH: PlayContext set ssh_common_args: () <windows_server> SSH: PlayContext set ssh_extra_args: () <windows_server> SSH: EXEC sshpass -d19 ssh -C -vvv -o ServerAliveCountMax=10 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -o User=user -o ConnectTimeout=20 -tt windows_server '/bin/sh -c '\"'\"'echo toto && sleep 0'\"'\"''\r\nfatal: [webserver]: UNREACHABLE! => {\"changed\": false, \"msg\": \"Failed to connect to the host via ssh.\", \"unreachable\": true}\r\n                 to retry, use: --limit @test.retry\r\n\r\nPLAY RECAP *********************************************************************\r\nwebserver : ok=1 changed=0 unreachable=1 failed=0\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/223560878","html_url":"https://github.com/ansible/ansible/issues/16025#issuecomment-223560878","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16025","id":223560878,"user":{"login":"aperigault","id":5754674,"avatar_url":"https://avatars.githubusercontent.com/u/5754674?v=3","gravatar_id":"","url":"https://api.github.com/users/aperigault","html_url":"https://github.com/aperigault","followers_url":"https://api.github.com/users/aperigault/followers","following_url":"https://api.github.com/users/aperigault/following{/other_user}","gists_url":"https://api.github.com/users/aperigault/gists{/gist_id}","starred_url":"https://api.github.com/users/aperigault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperigault/subscriptions","organizations_url":"https://api.github.com/users/aperigault/orgs","repos_url":"https://api.github.com/users/aperigault/repos","events_url":"https://api.github.com/users/aperigault/events{/privacy}","received_events_url":"https://api.github.com/users/aperigault/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T12:00:27Z","updated_at":"2016-06-03T12:00:27Z","body":"@jctanner: I think this is not a windows specific problem.\r\nAnybody can help me to solve it ?"}}
{"actor":{"display_login":"aperigault"}}