{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16927","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16927/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16927/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16927/events","html_url":"https://github.com/ansible/ansible/issues/16927","id":169035028,"number":16927,"title":"group_vars and host_vars undefined after upgrade from 2.1.0 to 2.1.1","user":{"login":"msnezhkov","id":3039558,"avatar_url":"https://avatars.githubusercontent.com/u/3039558?v=3","gravatar_id":"","url":"https://api.github.com/users/msnezhkov","html_url":"https://github.com/msnezhkov","followers_url":"https://api.github.com/users/msnezhkov/followers","following_url":"https://api.github.com/users/msnezhkov/following{/other_user}","gists_url":"https://api.github.com/users/msnezhkov/gists{/gist_id}","starred_url":"https://api.github.com/users/msnezhkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msnezhkov/subscriptions","organizations_url":"https://api.github.com/users/msnezhkov/orgs","repos_url":"https://api.github.com/users/msnezhkov/repos","events_url":"https://api.github.com/users/msnezhkov/events{/privacy}","received_events_url":"https://api.github.com/users/msnezhkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-03T02:44:26Z","updated_at":"2016-08-03T02:44:26Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\nansible 2.1.1.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n\r\n##### CONFIGURATION\r\ncustom role_path\r\n\r\n##### OS / ENVIRONMENT\r\nUbuntu 12.04\r\n\r\n##### SUMMARY\r\nAfter upgrade from 2.1.0 to 2.1.1 cannot use group_vars and host_vars in role's defined playbook\r\n\r\n##### STEPS TO REPRODUCE\r\n$ ansible-playbook -i hosts playbooks/playbook.yml \r\nEnter hosts for playbook run: test_group\r\n\r\nPLAY [Test playbook] ***********************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [10.10.10.5]\r\nok: [10.10.10.6]\r\n\r\nTASK [common-aliases : set alias] **********************************************\r\nfatal: [10.10.10.5]: FAILED! => {\"failed\": true, \"msg\": \"the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'root_mail_aliase' is undefined\\n\\nThe error appears to have been in '/home/snow/Documents/scripts/ansible/roles/common-aliases/tasks/main.yml': line 2, column 3, but may\\nbe elsewhere in the file depending on the exact syntax problem.\\n\\nThe offending line appears to be:\\n\\n---\\n- name: set alias\\n  ^ here\\n\"}\r\nfatal: [10.10.10.6]: FAILED! => {\"failed\": true, \"msg\": \"the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'root_mail_aliase' is undefined\\n\\nThe error appears to have been in '/home/snow/Documents/scripts/ansible/roles/common-aliases/tasks/main.yml': line 2, column 3, but may\\nbe elsewhere in the file depending on the exact syntax problem.\\n\\nThe offending line appears to be:\\n\\n---\\n- name: set alias\\n  ^ here\\n\"}\r\n\r\n$ cat playbook.yml\r\n---\r\n- name: Test playbook\r\n  hosts: \"{{ hosts }}\"\r\n  user: root\r\n  gather_facts: True\r\n  vars_prompt:\r\n    - name: hosts\r\n      prompt: \"Enter hosts for playbook run\"\r\n      private: no\r\n\r\n  roles:\r\n#check host_vars/ before run\r\n#check group_vars/ before run\r\n      - common-aliases\r\n\r\n$ cat group_vars/test_group\r\nroot_mail_aliase: \"admins@example.com\"\r\n\r\n$ cat /home/snow/Documents/scripts/ansible/roles/common-aliases/tasks/main.yml\r\n---\r\n- name: set alias\r\n  lineinfile: \"dest=/etc/aliases insertafter='^#root:' line='root:       {{ root_mail_aliase }}'\"\r\n\r\n\r\n##### EXPECTED RESULTS\r\nVariable root_mail_aliase can be accessible from task\r\n\r\n##### ACTUAL RESULTS\r\nRunning the playbook leads to the error above\r\n"}}
{"actor":{"display_login":"msnezhkov"}}