{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/14146","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/14146/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/14146/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/14146/events","html_url":"https://github.com/ansible/ansible/issues/14146","id":129071300,"number":14146,"title":"Ansible 2.0.0.2: Nested include + with_items does not work properly","user":{"login":"moorglade","id":8457512,"avatar_url":"https://avatars.githubusercontent.com/u/8457512?v=3","gravatar_id":"","url":"https://api.github.com/users/moorglade","html_url":"https://github.com/moorglade","followers_url":"https://api.github.com/users/moorglade/followers","following_url":"https://api.github.com/users/moorglade/following{/other_user}","gists_url":"https://api.github.com/users/moorglade/gists{/gist_id}","starred_url":"https://api.github.com/users/moorglade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moorglade/subscriptions","organizations_url":"https://api.github.com/users/moorglade/orgs","repos_url":"https://api.github.com/users/moorglade/repos","events_url":"https://api.github.com/users/moorglade/events{/privacy}","received_events_url":"https://api.github.com/users/moorglade/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":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/6","html_url":"https://github.com/ansible/ansible/milestones/stable-2.1","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/6/labels","id":995714,"number":6,"title":"stable-2.1","description":"","creator":{"login":"abadger","id":209242,"avatar_url":"https://avatars.githubusercontent.com/u/209242?v=3","gravatar_id":"","url":"https://api.github.com/users/abadger","html_url":"https://github.com/abadger","followers_url":"https://api.github.com/users/abadger/followers","following_url":"https://api.github.com/users/abadger/following{/other_user}","gists_url":"https://api.github.com/users/abadger/gists{/gist_id}","starred_url":"https://api.github.com/users/abadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abadger/subscriptions","organizations_url":"https://api.github.com/users/abadger/orgs","repos_url":"https://api.github.com/users/abadger/repos","events_url":"https://api.github.com/users/abadger/events{/privacy}","received_events_url":"https://api.github.com/users/abadger/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":270,"state":"open","created_at":"2015-02-25T19:26:53Z","updated_at":"2016-10-07T17:32:44Z","due_on":null,"closed_at":null},"comments":27,"created_at":"2016-01-27T08:41:39Z","updated_at":"2016-10-10T16:20:55Z","closed_at":"2016-05-12T01:53:24Z","body":"##### Issue Type: \r\nBug report\r\n\r\n##### Ansible Version:\r\nansible 2.0.0.2\r\nansible 2.1.0 (devel 7e3963420d)\r\n\r\n##### Ansible Configuration:\r\nN/A\r\n\r\n##### Environment:\r\nUbuntu 15.10\r\n\r\n##### Summary:\r\nAnsible 2.0 added a feature to use _include_ statements together with _with_items_ loops. When nesting _include_ statements, (i.e. file _A.yml_ includes _B.yml_, which includes _C.yml_) the _item_ variable is not set properly, i.e. the inner _include_ + _with_items_ loop does not override the _item_ value from the outer loop.\r\n\r\n\r\n##### Steps To Reproduce:\r\n*main.yml*\r\n```yaml\r\n---\r\n- include: include_outer.yml\r\n  with_items:\r\n    - 1\r\n    - 2\r\n    - 3\r\n```\r\n\r\n*include_outer.yml*\r\n```yaml\r\n---\r\n- debug:\r\n    msg: \"Outer include: item={{ item }}\"\r\n\r\n- include: include_inner.yml\r\n  with_items:\r\n    - A\r\n    - B\r\n    - C\r\n```\r\n\r\n*include_inner.yml*\r\n```yaml\r\n---\r\n- debug:\r\n    msg: \"Inner include: item={{ item }}\"\r\n```\r\n\r\n##### Expected Results:\r\n```\r\n\"msg\": \"Outer include: item=1\"\r\n\"msg\": \"Inner include: item=A\"\r\n\"msg\": \"Inner include: item=B\"\r\n\"msg\": \"Inner include: item=C\"\r\n\"msg\": \"Outer include: item=2\"\r\n\"msg\": \"Inner include: item=A\"\r\n\"msg\": \"Inner include: item=B\"\r\n\"msg\": \"Inner include: item=C\"\r\n\"msg\": \"Outer include: item=3\"\r\n\"msg\": \"Inner include: item=A\"\r\n\"msg\": \"Inner include: item=B\"\r\n\"msg\": \"Inner include: item=C\"\r\n```\r\n\r\n##### Actual Results:\r\n```\r\n\"msg\": \"Outer include: item=1\"\r\n\"msg\": \"Inner include: item=1\"\r\n\"msg\": \"Inner include: item=1\"\r\n\"msg\": \"Inner include: item=1\"\r\n\"msg\": \"Outer include: item=2\"\r\n\"msg\": \"Inner include: item=2\"\r\n\"msg\": \"Inner include: item=2\"\r\n\"msg\": \"Inner include: item=2\"\r\n\"msg\": \"Outer include: item=3\"\r\n\"msg\": \"Inner include: item=3\"\r\n\"msg\": \"Inner include: item=3\"\r\n\"msg\": \"Inner include: item=3\"\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/252669813","html_url":"https://github.com/ansible/ansible/issues/14146#issuecomment-252669813","issue_url":"https://api.github.com/repos/ansible/ansible/issues/14146","id":252669813,"user":{"login":"MatthewBooth","id":5381861,"avatar_url":"https://avatars.githubusercontent.com/u/5381861?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewBooth","html_url":"https://github.com/MatthewBooth","followers_url":"https://api.github.com/users/MatthewBooth/followers","following_url":"https://api.github.com/users/MatthewBooth/following{/other_user}","gists_url":"https://api.github.com/users/MatthewBooth/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewBooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewBooth/subscriptions","organizations_url":"https://api.github.com/users/MatthewBooth/orgs","repos_url":"https://api.github.com/users/MatthewBooth/repos","events_url":"https://api.github.com/users/MatthewBooth/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewBooth/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T16:20:55Z","updated_at":"2016-10-10T16:20:55Z","body":"^ That categorically does not work. Sorry. loop_control is totally broken."}}
{"actor":{"display_login":"MatthewBooth"}}