{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16973","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16973/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16973/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16973/events","html_url":"https://github.com/ansible/ansible/issues/16973","id":169626650,"number":16973,"title":"Hosts patterns include all intersections","user":{"login":"fastest963","id":112555,"avatar_url":"https://avatars.githubusercontent.com/u/112555?v=3","gravatar_id":"","url":"https://api.github.com/users/fastest963","html_url":"https://github.com/fastest963","followers_url":"https://api.github.com/users/fastest963/followers","following_url":"https://api.github.com/users/fastest963/following{/other_user}","gists_url":"https://api.github.com/users/fastest963/gists{/gist_id}","starred_url":"https://api.github.com/users/fastest963/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastest963/subscriptions","organizations_url":"https://api.github.com/users/fastest963/orgs","repos_url":"https://api.github.com/users/fastest963/repos","events_url":"https://api.github.com/users/fastest963/events{/privacy}","received_events_url":"https://api.github.com/users/fastest963/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/feature_idea","name":"feature_idea","color":"006b75"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-05T14:59:30Z","updated_at":"2016-08-05T15:29:31Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n\r\n##### ANSIBLE VERSION\r\nI just built from `stable-2.1` branch\r\n```\r\nansible 2.1.1.0\r\n  config file = /mnt/c/Users/james/Dropbox/aftermath/ansible-repo/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### SUMMARY\r\nHost patterns that include intersections end up applying the intersection onto all patterns.\r\n\r\n##### STEPS TO REPRODUCE\r\nApplicable groups:\r\n```\r\n[backend]\r\nlana\r\n\r\n[preagg]\r\nakira\r\n\r\n[dev-network]\r\nlana\r\n\r\n[cassandra_live_dcs]\r\nakira\r\n```\r\n\r\nHosts from affected play\r\n```\r\n- hosts:\r\n    - backend:&cassandra_live_dcs:&dev-network\r\n    - preagg\r\n```\r\n\r\nEven though `preagg` is it's own pattern, it's being intersected with the groups from the first pattern. If I comment out the first hosts pattern, then `akira` is correctly run. Since `akira` is also in `cassandra_live_dcs`, if I remove `:&dev-network` then it works correctly.\r\n\r\n##### EXPECTED RESULTS\r\nSince `akira` is in `preagg` I would expect it to have the play run on it.\r\n\r\n##### ACTUAL RESULTS\r\n\r\nOutput from `--list-hosts`:\r\n```\r\n(backend:&cassandra_live_dcs:&dev-network,preagg): backend:&cassandra_live_dcs:&dev-network,preagg    TAGS: [analyticsapi-preagg]\r\n    pattern: [u'backend:&cassandra_live_dcs:&dev-network', u'preagg']\r\n    hosts (1):\r\n     lana\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/237881785","html_url":"https://github.com/ansible/ansible/issues/16973#issuecomment-237881785","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16973","id":237881785,"user":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T15:29:31Z","updated_at":"2016-08-05T15:29:31Z","body":"marking this as a 'feature' as `:` and lists (`,`) are equivalent so it is all the same 'host pattern'"}}
{"actor":{"display_login":"bcoca"}}