{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/34075","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/34075/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/34075/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/34075/events","html_url":"https://github.com/ansible/ansible/issues/34075","id":283485077,"number":34075,"title":"\"allow_duplicates: no\" not work in include_role","user":{"login":"AndyEWang","id":34705558,"avatar_url":"https://avatars2.githubusercontent.com/u/34705558?v=4","gravatar_id":"","url":"https://api.github.com/users/AndyEWang","html_url":"https://github.com/AndyEWang","followers_url":"https://api.github.com/users/AndyEWang/followers","following_url":"https://api.github.com/users/AndyEWang/following{/other_user}","gists_url":"https://api.github.com/users/AndyEWang/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyEWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyEWang/subscriptions","organizations_url":"https://api.github.com/users/AndyEWang/orgs","repos_url":"https://api.github.com/users/AndyEWang/repos","events_url":"https://api.github.com/users/AndyEWang/events{/privacy}","received_events_url":"https://api.github.com/users/AndyEWang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-20T08:30:51Z","updated_at":"2017-12-20T08:30:51Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest -->\r\n - Bug Report\r\n\r\n\r\n##### COMPONENT NAME\r\ninclude_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 = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.5 (default, Aug  9 2016, 05:27:46) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\n\r\n# ansible-config dump --only-changed\r\nDEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles']\r\n\r\n\r\n##### OS / ENVIRONMENT\r\n\r\nN/A\r\n\r\n##### SUMMARY\r\n\r\n\"allow_duplicates: no\" not work, same role will be executed again.\r\n  tasks:\r\n    - include_role:\r\n        name: bb\r\n        allow_duplicates: no\r\n    - include_role:\r\n        name: bb\r\n        allow_duplicates: no\r\n\r\nMaybe following code causes this issue:\r\n                            if block._eor and host.name in block._role._had_task_run and not in_child:\r\n                                block._role._completed[host.name] = True\r\nBTW, I wonder why put \"not in_child\" here. Does it mean include_role/import_role is limited than roles?\r\n"}}
{"actor":{"display_login":"AndyEWang"}}