{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/41108","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/41108/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/41108/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/41108/events","html_url":"https://github.com/ansible/ansible/issues/41108","id":329248571,"node_id":"MDU6SXNzdWUzMjkyNDg1NzE=","number":41108,"title":"connection keyword no longer works with include_role","user":{"login":"rhopfer","id":11919189,"node_id":"MDQ6VXNlcjExOTE5MTg5","avatar_url":"https://avatars1.githubusercontent.com/u/11919189?v=4","gravatar_id":"","url":"https://api.github.com/users/rhopfer","html_url":"https://github.com/rhopfer","followers_url":"https://api.github.com/users/rhopfer/followers","following_url":"https://api.github.com/users/rhopfer/following{/other_user}","gists_url":"https://api.github.com/users/rhopfer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhopfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhopfer/subscriptions","organizations_url":"https://api.github.com/users/rhopfer/orgs","repos_url":"https://api.github.com/users/rhopfer/repos","events_url":"https://api.github.com/users/rhopfer/events{/privacy}","received_events_url":"https://api.github.com/users/rhopfer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-04T23:14:42Z","updated_at":"2018-06-04T23:18:26Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nTHIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED.\r\nAlso test if the latest release, and devel branch are affected too.\r\nALWAYS add information AFTER (OUTSIDE) these html comments.\r\nOtherwise it may end up being automatically closed by our bot. -->\r\n\r\n##### SUMMARY\r\nconnection keyword no longer works with include_role\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\ninclude_role\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.5.3\r\n  config file = /home/rhopfer/.ansible.cfg\r\n  configured module search path = ['/home/rhoper/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python3.6/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 3.6.5 (default, Apr 14 2018, 13:17:30) [GCC 7.3.1 20180406]\r\n```\r\n\r\n##### CONFIGURATION\r\ndefault\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### STEPS TO REPRODUCE\r\nconnection-test.yml:\r\n```yaml\r\n- hosts: remotehost\r\n  tasks:\r\n    - command: hostname\r\n      connection: local\r\n      register: result\r\n    - debug: var=result.stdout_lines\r\n    - include_role: name=echo-hostname\r\n    - include_role: name=echo-hostname\r\n      connection: local\r\n```\r\nroles/echo-hostname/tasks/main.yml\r\n```yaml\r\n- command: hostname\r\n  register: result\r\n- debug: var=result.stdout_lines\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nThe output of the last task shoul be 'localhost'.\r\n- https://docs.ansible.com/ansible/2.5/plugins/connection.html\r\n- https://docs.ansible.com/ansible/2.5/reference_appendices/playbooks_keywords.html#role\r\n\r\n##### ACTUAL RESULTS\r\n````\r\nPLAY [remotehost] **************************************************************\r\n\r\nTASK [Gathering Facts] *********************************************************\r\nok: [remotehost]\r\n\r\nTASK [command] *****************************************************************\r\nchanged: [remotehost]\r\n\r\nTASK [debug] *******************************************************************\r\nok: [remotehost] => {\r\n    \"result.stdout_lines\": [\r\n        \"localhost\"\r\n    ]\r\n}\r\n\r\nTASK [include_role] ************************************************************\r\n\r\nTASK [hostname_echo : command] *************************************************\r\nchanged: [remotehost]\r\n\r\nTASK [hostname_echo : debug] ***************************************************\r\nok: [remotehost] => {\r\n    \"result.stdout_lines\": [\r\n        \"remotehost\"\r\n    ]\r\n}\r\n\r\nTASK [include_role] ************************************************************\r\n\r\nTASK [hostname_echo : command] *************************************************\r\nchanged: [remotehost]\r\n\r\nTASK [hostname_echo : debug] ***************************************************\r\nok: [remotehost] => {\r\n    \"result.stdout_lines\": [\r\n        \"remotehost\"\r\n    ]\r\n}\r\n\r\nPLAY RECAP *********************************************************************\r\nremotehost                      : ok=7    changed=3    unreachable=0    failed=0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/394530187","html_url":"https://github.com/ansible/ansible/issues/41108#issuecomment-394530187","issue_url":"https://api.github.com/repos/ansible/ansible/issues/41108","id":394530187,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDUzMDE4Nw==","user":{"login":"ansibot","id":6585283,"node_id":"MDQ6VXNlcjY1ODUyODM=","avatar_url":"https://avatars0.githubusercontent.com/u/6585283?v=4","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T23:18:26Z","updated_at":"2018-06-04T23:18:26Z","author_association":"CONTRIBUTOR","body":"Files identified in the description:\n* [lib/ansible/playbook/role/include.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/role/include.py)\n\nIf these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.\n\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: components_banner --->"}}
{"actor":{"display_login":"ansibot"}}