{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/18613","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/18613/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/18613/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/18613/events","html_url":"https://github.com/ansible/ansible/issues/18613","id":191558780,"number":18613,"title":"Master playbook with multiple include same sub playbook run only once","user":{"login":"trompx","id":6394620,"avatar_url":"https://avatars.githubusercontent.com/u/6394620?v=3","gravatar_id":"","url":"https://api.github.com/users/trompx","html_url":"https://github.com/trompx","followers_url":"https://api.github.com/users/trompx/followers","following_url":"https://api.github.com/users/trompx/following{/other_user}","gists_url":"https://api.github.com/users/trompx/gists{/gist_id}","starred_url":"https://api.github.com/users/trompx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trompx/subscriptions","organizations_url":"https://api.github.com/users/trompx/orgs","repos_url":"https://api.github.com/users/trompx/repos","events_url":"https://api.github.com/users/trompx/events{/privacy}","received_events_url":"https://api.github.com/users/trompx/received_events","type":"User","site_admin":false},"labels":[{"id":437720699,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.2","name":"affects_2.2","color":"5319e7","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-24T16:26:47Z","updated_at":"2016-11-24T16:54:07Z","closed_at":"2016-11-24T16:43:59Z","body":"\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nMultiple playbook includes in master playbook\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.2.0.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\ninventory_ignore_extensions = ~, .orig, .bak, .ini, .retry, .pyc, .pyo, .tfstate\r\ngathering = smart\r\nfact_caching = jsonfile\r\nfact_caching_connection = /vagrant/facts\r\nfact_caching_timeout = 86400\r\n\r\n##### OS / ENVIRONMENT\r\nUbuntu 14.04\r\n\r\n##### SUMMARY\r\nWhen I include twice the same playbook in a master playbook with different params, the playbook is run only once.\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n\r\nmaster.yml\r\n```\r\n- include: playbook.yml\r\n    hosts=\"test1\"\r\n    myvar=\"ok\"\r\n\r\n- include: playbook.yml\r\n    hosts=\"test2\"\r\n    myvar=\"ko\"\r\n```\r\n\r\nplaybook.yml\r\n```\r\n- name: Playbook\r\n  hosts: \"{{ hosts }}\"\r\n  gather_facts: true\r\n  remote_user: myuser\r\n  tasks:\r\n    - debug: msg={{myvar}}\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nWhen running master.yml, I would expect that playbook.yml run twice and output:\r\n```\r\nok\r\nko\r\n```\r\n\r\n##### ACTUAL RESULTS\r\nOnly run the first time and output:\r\n```\r\nok\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/262817000","html_url":"https://github.com/ansible/ansible/issues/18613#issuecomment-262817000","issue_url":"https://api.github.com/repos/ansible/ansible/issues/18613","id":262817000,"user":{"login":"trompx","id":6394620,"avatar_url":"https://avatars.githubusercontent.com/u/6394620?v=3","gravatar_id":"","url":"https://api.github.com/users/trompx","html_url":"https://github.com/trompx","followers_url":"https://api.github.com/users/trompx/followers","following_url":"https://api.github.com/users/trompx/following{/other_user}","gists_url":"https://api.github.com/users/trompx/gists{/gist_id}","starred_url":"https://api.github.com/users/trompx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trompx/subscriptions","organizations_url":"https://api.github.com/users/trompx/orgs","repos_url":"https://api.github.com/users/trompx/repos","events_url":"https://api.github.com/users/trompx/events{/privacy}","received_events_url":"https://api.github.com/users/trompx/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T16:54:07Z","updated_at":"2016-11-24T16:54:07Z","body":"wordpress.yml is a list of tasks without host declaration, my playbook.yml has already a host declaration. I cannot do:\r\n```\r\n---\r\ntasks:\r\n   - include: playbook.yml\r\n       hosts=\"test1\"\r\n       myvar=\"ok\"\r\n\r\n   - include: playbook.yml\r\n       hosts=\"test2\"\r\n       myvar=\"ko\"\r\n```"}}
{"actor":{"display_login":"trompx"}}