{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/32503","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/32503/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/32503/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/32503/events","html_url":"https://github.com/ansible/ansible/issues/32503","id":270701108,"number":32503,"title":"import_role & include_role do not process variables in parameters","user":{"login":"tima","id":50353,"avatar_url":"https://avatars3.githubusercontent.com/u/50353?v=4","gravatar_id":"","url":"https://api.github.com/users/tima","html_url":"https://github.com/tima","followers_url":"https://api.github.com/users/tima/followers","following_url":"https://api.github.com/users/tima/following{/other_user}","gists_url":"https://api.github.com/users/tima/gists{/gist_id}","starred_url":"https://api.github.com/users/tima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tima/subscriptions","organizations_url":"https://api.github.com/users/tima/orgs","repos_url":"https://api.github.com/users/tima/repos","events_url":"https://api.github.com/users/tima/events{/privacy}","received_events_url":"https://api.github.com/users/tima/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-02T15:39:23Z","updated_at":"2017-11-02T15:39:23Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nAlso test if the latest release, and master branch are affected too.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module/plugin/task/feature -->\r\ninclude_role, import_role\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.4.1.0\r\n  config file = /path/to/ansible.cfg\r\n  configured module search path = [u'/Users/tima/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Users/tima/virtualenvs/ansible-2.4.1/lib/python2.7/site-packages/ansible\r\n  executable location = /Users/tima/virtualenvs/ansible-2.4.1/bin/ansible\r\n  python version = 2.7.10 (default, Jul 13 2015, 12:05:58) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nIf using Ansible 2.4 or above, paste the results of \"ansible-config dump --only-changed\"\r\n\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n\r\n-->\r\n\r\nNone\r\n\r\n##### OS / ENVIRONMENT\r\n<!---\r\nMention the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.\r\n-->\r\n\r\nMac OS 10.10.5\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\n\r\nUsing a variable in `tasks_from` in an `include_role` or `import_role` task is not recognized and interpreted.\r\n\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used.\r\n-->\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n---\r\n- name: Deploy sampleapp\r\n  hosts: localhost\r\n  connection: local\r\n  gather_facts: no\r\n  tasks:\r\n    - import_role:\r\n        name: sampleapp\r\n        tasks_from: \"{{ my_action }}\"\r\n```\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\n\r\nWith the `my_action` var set thru the extra vars, the corresponding task file in the role would be executed.\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nError message that the task file cannot be found.\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nansible-playbook main.yml -e \"my_action=provision.yml\"\r\nUsing /path/to/ansible.cfg as config file\r\nERROR! Could not find specified file in role: tasks/{{ my_action }}\r\n```\r\n"}}
{"actor":{"display_login":"tima"}}